Can This Docker Sandbox Move to Cloud?
Audit a Docker Sandboxes move for host dependencies, destination credentials, network policy, and restart time. Use the resulting manifest to decide whether to keep the job local or rehearse a cloud move.
Diff the two environments before scheduling a move
Write down what each dependency binds to in your local sandbox and what will provide it in Docker Cloud Sandboxes. For an illustrative documentation build, record the checkout revision, the source of a mounted glossary, and how a reviewer reaches the preview server. The glossary needs an approved staged copy or another destination-readable input. A preview that relied on a host-local port needs a review of the cloud HTTPS endpoint’s exposure before it is published. Hardware attached to the host can be a hard blocker. Also check the destination account’s support for the source architecture because moves retain the platform. Give each row a concrete acceptance check, such as matching the glossary checksum or observing the expected preview access behavior.
Compare local and cloud sandboxes | Docker DocsRehearse recovery with a clean checkpoint
Pause an ordinary build at a checkpoint that records its completed units, output checksums, and next unit. Use synthetic data for the rehearsal. Before creating the snapshot, verify that sign-in files and other credentials are absent from its contents and that the destination’s secret store can supply the agent’s approved credentials. Inventory any local rules for HTTP methods or paths and confirm that the destination enforces the required policy. Start a fresh destination process and record seconds until it produces the next verified output. If the last completed unit appears twice, the recovery test failed even if the final build passes. Keep the source as a rollback point during verification. The destination has its own ID, and subsequent writes in either sandbox diverge.
Move a sandbox | Docker DocsFind the input that decides placement
List the inputs your agent actually opens, including the repository revision, uncommitted changes, package files, and any device it needs. Docker Sandboxes can mount host paths locally. A Docker Cloud Sandbox has no access to host paths, so it needs files you transfer or a repository it can clone. If a job needs supported host hardware, test that integration locally before planning a cloud run.
For a cloud trial, stage the smallest complete set of inputs and record the expected commit and output path. Have the agent report the commit it sees and create a small artifact. Check both from outside the agent session. If the commit is wrong or a required fixture is missing, fix the input handoff before adding build steps.
Compare local and cloud sandboxes | Docker DocsResume from a file you can inspect
In an illustrative move, a coding agent has inspected 12 of 20 files at a recorded commit. Have it write the completed paths and findings to review-progress.json inside the sandbox filesystem. Use sbx move to transfer the filesystem snapshot. Stage the same repository revision separately if it was a host mount, since that mount does not appear at the destination.
Start a fresh agent process in the destination and give it the saved file and the expected commit. Pass the trial if it finds all 12 records, inspects the remaining eight files, and produces one report with 20 distinct paths. If the progress file is missing, check where it was written. If only the running process knew the completed paths, restart from the last record you can verify.
Move a sandbox | Docker DocsTest sign-in and connectivity separately
For a cloud trial with Claude Code, configure an Anthropic API key through the cloud secret interface before launching the agent. Docker documents separate local and cloud CLI secret stores. First ask the agent for a one-line response that requires no repository access. Then fetch the test checkout in a separate step and record whether each operation succeeds.
If the first step fails, check whether the credential was configured through the cloud CLI interface for the intended account and agent. If it passes but the checkout fails, investigate repository access and cloud network policy before changing the model credential. Use the same two checks after a move. A successful model response verifies sign-in for that trial, while a successful checkout verifies that the repository is reachable with the access you supplied.
Authenticate cloud agents | Docker Docs