dock

Dock vs Modal Sandboxes

Modal Sandboxes are built for scale, speed, and exec from code across many short sessions. Dock is built for docks that stay, on your hosts or ours.

Side by side

Modal Sandboxes in its own words: “Isolated environments for RL rollouts, coding agents, and untrusted code at massive scale.”

CapabilityDockModal Sandboxes
IsolationDockFirecracker microVMs on Linux KVM hosts, or gVisor containers on Linux hosts with Docker. The host picks the runtime.Modal SandboxesgVisor by default; a VM runtime with its own kernel is available.
PersistenceDockStop keeps the disk and releases compute; resume brings back the same dock ID and files. gVisor docks keep only /home/user/work across stops.Modal SandboxesSessions default to 5 minutes and can run up to 24 hours; continue from snapshots after that.
Snapshots and forksDockBranch copies a dock into independent, writable docks. Snapshots save a dock, and a dock saved by name over the API can start new docks.Modal SandboxesFilesystem and directory snapshots with default expiry; memory snapshots in alpha.
Docker insideDockDocker, systemd, ssh, and git ship in the ubuntu-24.04 image.Modal SandboxesWith the VM runtime, by running dockerd yourself.
SSHDockYes. Run commands with exec or open a shell with ssh.Modal SandboxesNo built-in SSH; run your own sshd behind a TCP tunnel.
DesktopDockNot yet. Docks are Linux machines, also when they run locally on Windows.Modal SandboxesNot stated.
Network egressDockOn a fleet host, open outbound by default, with private ranges, cloud metadata and other docks blocked. An admin can set an allowlist per environment, enforced by a proxy on the host, outside the dock. Local docks have network on (the default) or off; with it on, they block your machine's localhost by default, through a rule inside the guest that root in the dock can remove.Modal SandboxesBlock network, CIDR allowlist, and a beta domain allowlist.
SecretsDockCredentials stay outside the dock by default: the dock holds a dock-scoped token, and Dock's LLM gateway (model keys) or the connector gateway (Figma, Linear, Slack, Sentry) adds the real key. GitHub clones use a short-lived, read-only token.Modal SandboxesModal Secrets are injected into the sandbox, plus OIDC identity tokens.
AuditDockThe control plane records every lifecycle operation.Modal SandboxesLifecycle events and exit codes.
PlatformDockFocused on isolated Linux machines for agents, self-hostable.Modal SandboxesPart of a wider serverless compute, GPU, and inference platform.

Where Dock is different

Long-lived machines
A dock keeps its identity across stop and resume instead of ending at a session cap.
Docker in the image
The ubuntu-24.04 image ships systemd, ssh, Docker, and git; no special runtime needed.
Self-host under AGPL-3.0
Run the control plane with one command (setup.sh) and enroll hosts that dial out to it. Dock Cloud, coming soon, runs the same code.

Where Modal Sandboxes is strong

Proven scale
Modal runs very large fleets of sandboxes and is used by well-known engineering teams.
GPU and inference platform
Sandboxes sit next to Modal functions, GPUs, and model serving.

Choose Dock if

each agent needs a persistent machine it comes back to, or you want to run the machine layer on your own hosts.

Choose Modal Sandboxes if

you run very high volumes of short, disposable sandboxes such as RL rollouts next to GPU workloads.

Start a dock in a minute.

Self-host Dock for free, or join the waitlist for Dock Cloud.