Share feedback
Answers are generated based on the documentation.

sbx policy check network

DescriptionCheck network access to a host
Usagesbx policy check network [--sandbox SANDBOX] TARGET [flags]

Description

Check whether current policy allows network access to TARGET.

TARGET may be a hostname, host:port, IP literal, or URL. Bare hosts and IP literals are evaluated with port 443. HTTP(S) URLs use their default ports; other URL schemes must include an explicit port.

Options

OptionDefaultDescription
--jsonOutput in JSON format
--sandboxEvaluate in a specific sandbox policy context
--verboseShow the exact policy request fields

Global options

OptionDefaultDescription
--cloudDispatch to Docker Cloud Sandboxes API instead of local sandboxd (supported by a growing set of verbs — run 'sbx --cloud --help' for the current list)
--cloud-api-urlhttps://api.sandboxes-cloud.docker.comCloud Sandboxes API base URL; only used with --cloud. Defaults to prod (https://api.sandboxes-cloud.docker.com). Set DOCKER_CLOUD_API_URL or pass this flag to override; a legacy value ending in /v1 is accepted.
-D, --debugEnable debug logging

Examples

# Check global network policy
sbx policy check network api.example.com

# Check policy in a sandbox context
sbx policy check network --sandbox my-sandbox api.example.com:443

# Check a pasted URL and output JSON
sbx policy check network --json https://api.example.com/v1