Skip to main content
A custom image is a sandbox frozen after your setup ran, memory included. A sandbox made from it boots with your packages installed and your start command already running. Zode also builds official images that every workspace can use in every size.

Two ways to describe an image

A Dockerfile, with -f (or -f - to read it from stdin):
Setup commands, with flags:
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 the FROM line.

FROM zode/base or ubuntu:24.04

With FROM 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 as node: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:
A multi-stage image built with Docker:

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:
The control plane keeps the newest 512 KB of each log; older output shows as [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

Sandboxes already made from an image keep running after you delete it. In the console, Images builds and lists images, and New sandbox offers your ready images. In the API, use 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.