Modal vs Docker Cloud Sandboxes
Modal runs short-lived gVisor sandboxes on a big AI compute platform, with GPUs, many regions and thousands of sandboxes at once. Docker Cloud Sandboxes puts the sbx microVM you run on your laptop into the cloud, with its own Docker Engine and memory kept when it stops, but 10 at a time by default.
The companies and products
Modal
Modal is a serverless cloud for AI work: inference, training, batch jobs and sandboxed code, all driven from Python, TypeScript or Go code.
Modal Sandboxes are containers you create from code, run commands in, and then terminate. By default they run under gVisor, a user-space kernel from Google; since October 2026 you can also pick a VM runtime with its own Linux kernel for Docker and FUSE (Battleships tracks that as a separate card, Modal VM Sandboxes). It suits teams that already run models on Modal and want short-lived, scalable code execution next to their GPUs.
Docker Cloud Sandboxes
Docker Cloud Sandboxes runs Docker's sbx coding-agent microVMs on Docker-managed compute instead of your laptop.
Each sandbox is a microVM with its own Linux kernel and its own Docker Engine, started from the same sbx CLI you use locally, with Claude Code, Codex and other agents ready to run. You can move a sandbox from your laptop to the cloud and back, publish HTTPS ports and SSH in. It launched on September 24, 2026, is billed pay-as-you-go on a personal Docker account, and is built for developers who want their local agent sandboxes to keep going off their machine.
- Launched
- September 24, 2026
- Session length
- 1 hour by default, extendable to 24 hours from creation
- Default quota
- 10 concurrent and 50 stored sandboxes per account
- Regions
- Not published
Which use cases each one fits
For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “19th cheapest of 345” means 18 of the other 344 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.
| Use case and its workload | Modal: price rank | Docker Cloud Sandboxes: price rank | bochka: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month A software factory needs Docker inside and agents that work for days; Docker has Docker but stops at 24 hours, Modal's default sandbox has neither, and bochka has both with no session cap on paid plans. | Can't run it | 280th of 367, with limits $4,928 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An agent that lives on its machine all month hits the 24-hour cap on both Modal and Docker, while a bochka sandbox can keep running on paid plans. | 196th of 366, with limits $1,924 a month | 276th of 366, with limits $5,110 a month | 5th cheapest of 366 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month Modal fits bursts of short code runs much better than Docker, with fast starts and thousands of sandboxes at once on Team, while Docker allows 10 at a time by default. | 19th cheapest of 345 $181 a month | 119th of 345, with limits $233 a month | 186th of 345, with limits $2,000 a month |
| Sandboxes for your users 300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month Serving your own users needs hundreds of sandboxes at once, which Modal's Team plan allows and Docker's default quota of 10 does not; bochka also keeps each user's disk while the sandbox is stopped for free. | 11th cheapest of 361 $811 a month | 136th of 361, with limits $1,628 a month | Cheapest of 361 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month RL rollouts launch many short sandboxes at once, which is what Modal is built for; Docker's default of 10 concurrent sandboxes holds it back. | 5th cheapest of 360 $19,038 a month | 114th of 360, with limits $7,000 a month | 34th of 360, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month | 59th cheapest of 364 $1,244 a month | 167th of 364, with limits $1,400 a month | 10th cheapest of 364 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month | 126th cheapest of 377 $1,793 a month | 172nd of 377, with limits $672 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A dev box that stays on all month does not fit either one in a single session; Docker at least keeps memory and files across a stop, while Modal keeps only what sits in a Volume. | 138th of 368, with limits $23 a month | 127th of 368, with limits $204 a month | 18th cheapest of 368 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month Computer-use agents need a screen; neither Modal nor Docker ships one, while bochka has a 60fps desktop with Chromium and a computer-use API. | 98th of 369, with limits $183 a month | 268th of 369, with limits $1,400 a month | 6th cheapest of 369 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month | 177th of 367, with limits $136 a month | 277th of 367, with limits $700 a month | 7th cheapest of 367 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 267th of 346, with limits $394 a month | 262nd of 346, with limits $350 a month | 6th cheapest of 346 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month | 223rd of 338, with limits $8,795 a month | 190th of 338, with limits $7,000 a month | 71st of 338, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | Can't run it | 248th of 360, with limits $350 a month | 2nd cheapest of 360 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month Modal rents GPUs from T4 to B300 next to its sandboxes; Docker Cloud Sandboxes and bochka are CPU only. | 19th cheapest of 98 $1,187 a month | Can't run it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | Modal | Docker Cloud Sandboxes | bochka |
|---|---|---|---|
| Isolation | gVisor user-space kernel by default; a VM runtime is available separately | MicroVM with its own Linux kernel; hypervisor not named | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Docker inside | Only with the VM runtime, not the default sandbox | Yes, its own Docker Engine; the agent runs as a non-root user with sudo | Yes, in every sandbox, with root and systemd |
| Nested virtualization | VM runtime only, Team and Enterprise plans, on request | Not documented | Yes, /dev/kvm for Android emulators and VMs |
| Longest session | 24 hours (default 5 minutes) | 24 hours from creation (default 1 hour); resuming starts a new timer | No cap on paid plans; you set the time to live |
| Stop and resume | No paused state; a finished sandbox is gone, only Volumes keep files | Stop keeps memory and files, free while stopped; snapshots unused for 7 days are deleted | Disk saved every minute and on stop, free while stopped; resume boots the machine again |
| Fork and snapshots | Filesystem snapshots; memory snapshots in alpha end the sandbox and expire after 7 days | Snapshot a running sandbox with disk or disk and memory, restore it as a new one | Fork a running sandbox with its disk, without stopping it |
| Sandboxes at once | 100 containers on Starter, 5,000 on Team | 10 by default; no published way to raise it | 100 on the $20 plan, up to 2,000 on higher plans |
| GPUs | T4 to B300; 10 at once on Starter, 50 on Team | None, CPU only | None |
| Desktop and browser | Not offered; an example shows how to set up VNC yourself | Terminal sessions only | 60fps Linux desktop with Chromium and a computer-use API |
| Coding agents | Examples only; you install the agent yourself | Claude Code, Codex, Copilot, OpenCode and more, run and attached to from the sbx CLI | Seven agents preinstalled, with a prompt, steer and events API to drive them from outside |
| Keeping API keys out of the sandbox | Secrets are environment variables, or you run your own proxy in a sidecar | Cloud proxy sets the auth header for AI services and custom hosts; the sandbox sees a placeholder | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Outbound rules | Block all, IP-range allowlist, domain allowlist (beta) | Allow and deny rules by host, with allow-all, balanced and deny-all presets | Open internet, no provider-side allowlist |
| Inbound access | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | Public HTTPS URL per published port, not behind Docker sign-in; SSH with Docker-issued certificates | HTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP and a dedicated IP |
| Regions | US, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75x | Not published | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Modal | Docker Cloud Sandboxes | bochka |
|---|---|---|---|
| Full VM (own kernel) | No | Yes | Yes |
| Docker inside | No | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | Not published | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | No | Yes | Yes |
| Automatic snapshots | No | Yes | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | No | Yes | Yes |
| Memory fork | Yes | Yes | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | No | No |
| Wake on request | No | Not published | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | Yes | Not published | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | No | Yes | Yes |
| Secret proxy for any API | No | Yes | Yes |
| Preinstalled agents | No | Yes | Yes |
| Agent harness API | No | No | Yes |
| MCP server | No | Yes | No |
| GPU | Yes | No | No |
| Windows | No | No | No |
| Arm64 | No | Yes | No |
| Self-hosting | No | No | No |
| BYOC | No | No | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | Not published | Yes |
| Usage per sandbox (API) | Not published | No | Yes |
| Audit logs | Yes | Not published | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | No | No |
| HIPAA | Yes | No | No |
| EU data residency | Yes | No | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
In the same hpc-sandbox-benchmarks run at 4 vCPU / 8 GB on 29 September 2026, bochka finished 26.69 Node.js build-and-test runs per second and Modal's default gVisor sandbox finished 12.79, so bochka did about twice the work. Docker Cloud Sandboxes has no comparable measurement yet: it launched in September 2026, is not in the benchmark runs, and Docker does not say what hardware it uses.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal measured on: Sandbox (gVisor), request = size, any region. Docker Cloud Sandboxes has no published run in this suite yet, so there is no like-for-like number to compare.
Pricing in five scenarios
Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.
| Scenario | Modal, a month | Docker Cloud Sandboxes, a month | bochka, a month |
|---|---|---|---|
| One coding agent, workdays 4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days | $15 · Starter · with limits | $49 · Docker Agentic Platform (pay-as-you-go) | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $178 · Starter · with limits | $204 · Docker Agentic Platform (pay-as-you-go) · with limits | $26 · $20/mo |
| 50 agents in parallel 50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside | $2,229 · Starter · with limits | $2,464 · Docker Agentic Platform (pay-as-you-go) · with limits | $317 · $20/mo × 3 seats |
| Sandboxes for your users 2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once | $792 · Team | $700 · Docker Agentic Platform (pay-as-you-go) · with limits | $200 · $100/mo × 2 seats |
| 1,000 short jobs at once 2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month | $3,193 · Team · with limits | $1,400 · Docker Agentic Platform (pay-as-you-go) · with limits | $2,000 · $2000/mo · with limits |
Modal: Modal bills by the second for whichever is higher, the CPU and memory you request or what you use, and an idle sandbox pays until it ends. Starter is free with $30 of monthly credit, Team is $250 a month with $100 of credit, and pinning a region multiplies the price by 1.15x to 1.75x.
Docker Cloud Sandboxes: Docker bills per second for the size you pick, from $0.07 an hour for 1 vCPU / 2 GiB to $1.12 an hour for 16 vCPU / 32 GiB, with no monthly fee. A stopped sandbox costs nothing, and volumes and egress are free.
Docker Cloud Sandboxes: bochka charges one hourly rate per machine size, by the second, only while the sandbox runs. Plans start at $20 a month and the whole fee becomes usage credit; a stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
Both Modal and Docker cap a sandbox at 24 hours, so one agent that never stops fits neither in a single session. Docker's default of 10 concurrent sandboxes rules it out for 50 agents in parallel, sandboxes for your users and 1,000 short jobs at once, while Modal handles the user sandboxes on Team but cannot run Docker in the 50-agent fleet without its VM runtime and keeps files between workdays only in a Volume. bochka fits every scenario but the 1,000-job burst, where even the $2,000 plan queues starts.
| Scenario | Modal | Docker Cloud Sandboxes | bochka |
|---|---|---|---|
| One coding agent, workdays |
| None that bite | None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users | None that bite |
| None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use Modal when
your sandboxes need GPUs, must run outside Europe, or come in huge bursts of short jobs that finish in minutes.
- GPUs next to your sandboxes. If your agent trains or runs models, Modal rents GPUs from T4 to B300 on the same platform as its sandboxes.
- Very large bursts. For thousands of short jobs at once, Modal runs up to 5,000 containers on Team, where Docker allows 10 by default.
- Regions around the world. If your sandboxes must run in the US or Asia-Pacific, Modal lets you pin a region; Docker does not publish where it runs.
Use Docker Cloud Sandboxes when
you already run agents in sbx on your laptop and want a few of them to keep going in the cloud for up to a day, with Docker inside and memory kept across stops.
- Docker inside by default. Every Docker cloud sandbox has its own Docker Engine, while Modal needs its separate VM runtime for that.
- Stop with memory kept. For agents that pause between steps, a stopped Docker sandbox comes back with its memory and running processes.
- The same sandbox on your laptop. If you already run sbx locally, the cloud is the same microVM and CLI, and you can move a sandbox either way.
Where bochka fits
Modal and Docker both stop a sandbox at 24 hours, and neither gives an agent a screen. If your agents work for days, run by the dozen with Docker inside, or need a desktop and browser to check what they built, bochka is the one to look at.
No 24-hour cutoff
Modal ends a sandbox within 24 hours and wipes its root disk, and Docker ends one 24 hours after creation. Your code has to save and restart the work. bochka has no session cap on paid plans and saves the disk every minute.
A whole machine, screen included
Neither ships a desktop: on Modal you set up VNC yourself, and Docker is terminal only. On Modal, Docker and nested virtualization need the VM runtime; Docker does not document /dev/kvm. bochka has a 60fps desktop, Docker and /dev/kvm in every sandbox.
Faster machines, driven from outside
bochka did 26.69 build-and-test runs per second against 12.79 for Modal's default sandbox, and Docker has no measurement. You prompt and steer bochka's preinstalled agents through an API, where Docker means attaching to a terminal.
Use bochka when your agents work for days or by the dozen, need Docker, a desktop or Android emulators, and have to be driven from your own app through an API. Compare it one to one: bochka vs Modal and bochka vs Docker Cloud Sandboxes.
Questions people ask
Is Modal cheaper than Docker Cloud Sandboxes?
Often, yes. One coding agent on workdays is $15 a month on Modal against $49 on Docker, though Modal's files reset between days unless you use a Volume. One always-on agent is $178 on Modal against $204 on Docker, and both hit a 24-hour cap; bochka runs those at $20 and $26 a month.
Which is faster, Modal or Docker Cloud Sandboxes?
There is no fair answer yet: Docker Cloud Sandboxes has not been measured in the hpc-sandbox-benchmarks runs. Modal's default sandbox finished 12.79 runs per second at 4 vCPU / 8 GB, and bochka finished 26.69 in the same run.
Can Modal run Docker inside a sandbox like Docker Cloud Sandboxes?
Only with Modal's VM runtime, chosen with runtime="vm"; the default gVisor sandbox does not document Docker support. Every Docker cloud sandbox has its own Docker Engine, and so does every bochka sandbox.
How long can a sandbox run on Modal and on Docker?
Both stop at 24 hours. Modal defaults to 5 minutes and Docker to 1 hour, and Docker's limit counts from creation, though resuming a stopped sandbox starts a new timer. bochka has no session cap on paid plans.
How many sandboxes can I run at once?
Modal allows 100 containers on Starter and 5,000 on Team. Docker allows 10 concurrent and 50 stored per account by default and publishes no way to raise it. bochka runs 100 at once on the $20 plan and up to 2,000 on higher plans.
Does either have GPUs?
Modal does, from T4 to B300, on its default gVisor runtime. Docker Cloud Sandboxes and bochka are CPU only, so Modal is the pick for GPU jobs.
Try bochka
Install the CLI, then run bochka new.
Product preview