Skip to main content
Install Docker in the image and enable it on the sandbox:
Set docker_enabled=True and include Docker in the image. with_docker() installs it for you.

Build and Run

Commands return a DockerResult with wait(), stdout, stderr, and success. You can also pull, push, tag, list, and remove images or containers.

Networking and Compose

Docker containers share the sandbox’s network. Expose a service with sb.expose_port(PORT); host-port remapping is not supported. Upload your Compose file and source into the sandbox before starting the stack:
compose_up returns a handle with logs, ps, and stop. Use sb.aio.docker for async calls.