Cloud network policy controls outbound connections from cloud sandboxes. Use
sbx --cloud policy to manage account rules and inspect sandbox network access.
重要Rules configured for an individual local sandbox aren't copied to cloud sandboxes. Set cloud sandbox rules at creation and verify network access using connection checks and policy logs.
Understand policy scope
Your Docker governance policy supplies the account-level network rules for
cloud sandboxes. Account-level sbx --cloud policy commands edit the signed-in
user's Docker governance policy, which also applies to local sandboxes. You can
also manage this policy at https://app.docker.com
. Organization account policy
cannot be edited with sbx.
Set sandbox-specific rules at creation with --allow-network and
--deny-network. The CLI rejects later edits with --sandbox. Agents and kits
can also declare the network access they need. Matching deny rules take
precedence over allow rules across the applicable policies.
Cloud commands automatically migrate legacy cloud network policy to Docker governance. If the CLI reports a problem, see Resolve migration problems .
Define the intended policy for your cloud sandboxes. After creation, inspect the configured rules and verify connection decisions .
Initialize account policy
Set the account policy to allow-all, balanced, or deny-all:
$ sbx --cloud policy init deny-all
The default applies to your cloud sandboxes in the Docker account. You can add rules after initialization or specify initial rules when creating a sandbox. Setting deny-all with no allow or deny rules writes an explicit deny of every destination.
The balanced preset sets deny-all as the default and adds allow rules for
common development services.
You can run init again to change the default. Existing allow and deny rules
remain in place. Use reset before choosing another preset.
Add network rules
Add an account-level exception:
$ sbx --cloud policy allow network api.github.com:443
Deny rules take precedence when the same destination matches both an allow rule and a deny rule.
Cloud rules match network destinations. HTTP method and path restrictions,
--protocol, and local governance profiles aren't supported.
You can also add initial rules while creating a sandbox:
$ sbx --cloud create --name cloud-project \
--allow-network api.github.com:443 \
--deny-network example.com claude
Inspect network policy
Inspect your account policy or a sandbox's configured policy:
$ sbx --cloud policy ls
$ sbx --cloud policy ls cloud-project
These commands show the policy in effect. The sandbox view requires a running sandbox.
To verify enforcement, attempt the connection from the sandbox, then review the connection decisions:
$ sbx --cloud exec cloud-project curl -I https://api.github.com
$ sbx --cloud policy log cloud-project
These records describe cloud network policy decisions. They aren't Docker AI Governance organization audit logs.
Remove network rules
Remove an account rule by its pattern, from whichever allow or deny list contains it:
$ sbx --cloud policy rm network --resource api.github.com:443
Reset the account policy:
$ sbx --cloud policy reset
Reset replaces your Docker governance network rules with an allow for every host. Sandbox-specific policies remain in place.
The command asks for confirmation and prints the default stored by the server
after the reset. Use --force in scripts. The command doesn't restart the
local daemon.
Resolve migration problems
If a policy command reports that migration is blocked, follow its warning to resolve the conflict, then run the command again. For example, migration can be blocked by conflicting Docker governance rules or existing sandboxes that still rely on the legacy policy. Manage Docker governance rules at https://app.docker.com .
Until migration completes, cloud policy commands use the legacy policy store.
In that store, policy reset removes the custom account policy and returns to
the platform default.