Two ways to describe an image
A Dockerfile, with-f (or -f - to read it from stdin):
Use one form or the other, not both. Both forms also take
--size, --timeout (minutes) and --detach (start the build and return instead of following the log).
How a Dockerfile is read
A Zode image is a VM running Ubuntu 24.04 with Docker, not a container. What happens depends on theFROM line.
FROM zode/base or ubuntu:24.04
WithFROM zode/base, FROM ubuntu:24.04 (also zode, ubuntu:noble), each instruction runs directly in the VM:
Refused, with the line number:
COPY and ADD (there is no build context yet; fetch files with RUN curl or RUN git clone), ONBUILD, RUN --mount, a second FROM, a --platform other than amd64, and a SHELL other than bash or sh.
FROM anything else
With any other base, such asnode:22, python:3.12 or a multi-stage build, Zode runs docker build inside the VM. The sandbox is still the Ubuntu VM; your image sits in its Docker, with nothing left to pull at boot. If the Dockerfile has a CMD or ENTRYPOINT, the container runs as zode-image with the host network before the freeze.
COPY --from=<stage> and ADD https://... work. Local COPY and ADD do not.
Examples
A dev server that is up when the sandbox boots:Size and region
An image is built at one size,small unless you pass --size, and every sandbox made from it has that size and region. zode new --image web --size large fails with “an image has its own size; drop —size”; the API returns 400 for a mismatched vcpus.
An image lives on the host that built it, and its sandboxes are placed there. If that host is full, create returns 503 no_capacity.
Builds and logs
A build runs in a VM like any sandbox, with your workspace’s network policy. No environment secrets reach a build.zode image build follows the build log until the image is ready or failed. Warnings print first as note: lines. To read or follow a log later:
[N bytes of log not kept]. A failed step names its step and Dockerfile line, for example step 2, Dockerfile line 3 (...): exited with 3.
The build time limit is 30 minutes by default, 1 to 60 with --timeout.
Statuses
Only a
ready image starts sandboxes; others return 409 invalid_state.
Names and limits
Image names match^[a-z0-9][a-z0-9._-]{0,62}$ and are unique in the workspace (409 name_taken). Ids start with img_. Commands accept either.
Over a limit you get 409
limit_reached. A Dockerfile is at most 64 KB, 200 steps and 16 KB per step, with at most 100 variables.
Manage images
POST /v1/images and pass image (a name or img_ id) to POST /v1/sandboxes; see the API reference. In the TypeScript SDK, pass image to Sandbox.create (0.2.0 or later; see Custom images). From an MCP client, pass image to sandbox_create.