Portal Community
  About Docker networks: Docker networks enable container-to-container communication. Containers on the same user-defined network can reach each other by container name — DNS resolution is built in. User-defined networks provide better isolation than the default bridge network.

When to Use

Configuration

Connection

FieldTypeDefaultDescription
dockerHoststringunix:///var/run/docker.sockDocker daemon socket path or TCP endpoint.
connectionTypestringunixsocketOne of: unixsocket, tcp, tcptls.
tlsCertPathstringTLS certificate directory. Required for tcptls. optional
timeoutSecondsint30Operation timeout. optional

Operation Fields

FieldTypeBadgeDescription
NamestringrequiredNetwork name. Use a meaningful name such as app-backend or tenant-0042.
DriverstringoptionalNetwork driver: bridge (default, single host), overlay (Swarm multi-host), host, none.
AttachablebooloptionalIf true, standalone containers can attach to this overlay network.
LabelsstringoptionalJSON key-value label pairs (e.g., {"tenant_id":"0042","env":"prod"}).

Sample Configuration

{
  "resource": "network",
  "operation": "create",
  "connection": {
    "dockerHost": "unix:///var/run/docker.sock",
    "connectionType": "unixsocket"
  },
  "Name": "tenant-{{ $vars.tenantId }}",
  "Driver": "bridge",
  "Labels": "{\"tenant_id\":\"{{ $vars.tenantId }}\",\"env\":\"prod\"}"
}

Validation Errors

Error CodeConditionResolution
MISSING_INPUTName field is empty.Provide a valid network name.
CONFLICTA network with this name already exists.Use network/list to check existence first, or treat as idempotent and continue.
CONFIG_ERRORConnection settings malformed.Check dockerHost and connectionType.
DOCKER_API_ERRORDriver not available or invalid options.Ensure the driver plugin is installed and options are valid.

Output

Success Port

FieldTypeDescription
statusstring"ok" on success.
resourcestring"network"
operationstring"create"
networkIdstringThe ID of the newly created network.
networkNamestringThe network name.

Error Port

Fires when network creation fails. CONFLICT means a network with this name already exists.

Sample Output

{
  "status": "ok",
  "resource": "network",
  "operation": "create",
  "networkId": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
  "networkName": "tenant-0042"
}

Expression Reference

ExpressionReturns
{{ $output.networkId }}Network ID — pass to network/connect to attach containers.
{{ $output.networkName }}Network name — include in provisioning audit log.
{{ $output.status }}"ok" — gate downstream container creation on this value.

Node Policies & GuardRails

PolicyEnforcement
Never expose Docker daemon TCP without TLSUse tcptls for remote connections. Plain tcp is blocked in production GuardRail profiles.
Store TLS certificates in Credentials ManagerReference tlsCertPath via {{ $credentials.dockerTlsCertPath }}.
Never use host-mode driver in productionHost-mode networks remove network namespace isolation. GuardRail blocks Driver: "host" in production profiles.
Apply labels for metadata trackingAlways label networks with tenant ID and environment for audit and cleanup targeting.
Always handle the error portWire the CONFLICT error port to a branch that checks whether the existing network is the correct one before continuing.
Disconnect containers before removing networksAlways disconnect all containers with network/disconnect before calling network/remove.

Examples

Example 1 — Tenant Isolation Network

Create a dedicated bridge network per tenant during onboarding. Pass the network ID to downstream container creation steps.

{
  "resource": "network",
  "operation": "create",
  "Name": "tenant-{{ $trigger.tenantId }}",
  "Driver": "bridge",
  "Labels": "{\"tenant_id\":\"{{ $trigger.tenantId }}\",\"env\":\"prod\"}"
}
// Pass networkId to container/create's Networks field

Example 2 — Application Tier Separation

Create two networks for a three-tier application: one for frontend-to-API traffic and one for API-to-database traffic. Containers are then connected to only the networks they need.

// Network 1: web tier
{ "Name": "app-web",     "Driver": "bridge" }
// Network 2: data tier
{ "Name": "app-data",    "Driver": "bridge" }

// API container gets connected to both; DB container only to app-data

Example 3 — Ephemeral CI Network

Create a uniquely named network for each CI run to prevent cross-run interference, then remove it after the test suite completes.

// Create with run-unique name:
{
  "Name": "ci-run-{{ $trigger.runId }}",
  "Driver": "bridge",
  "Labels": "{\"ci_run\":\"{{ $trigger.runId }}\"}"
}
// After tests: network/remove using the same name