0.7.0
Different versions of the same box
You can define multiple versions of the same box in boxes.json
:
{
"alpine": {
"image": "codapi/alpine"
},
"alpine:3.18": {
"image": "codapi/alpine:3.18"
}
}
and pass the version in the request:
{
"sandbox": "sh",
"version": "3.18",
"command": "run",
"files": {
"": "echo hello"
}
}
The default version is latest
. It is assumed in both boxes.json
and requests unless explicitly stated otherwise.
Binary file support
You can pass binary files in the request using data-url encoding. For example, this request:
{
"sandbox": "sh",
"command": "run",
"files": {
"main.sh": "ls data.bin",
"data.bin": "data:application/octet-stream;base64,MTIz"
}
}
will create the file data.bin
on the server with a binary content of 123
.
Temporary directory permissions
To avoid "permission denied" errors when the host user UID does not match the container user UID (see #6), the temporary directory for the request is now created with 777
permissions.