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. The default bridge network does not provide automatic DNS between containers.

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

This operation requires no additional input fields. Set resource to network and operation to list.

Sample Configuration

{
  "resource": "network",
  "operation": "list",
  "connection": {
    "dockerHost": "unix:///var/run/docker.sock",
    "connectionType": "unixsocket"
  }
}

Validation Errors

Error CodeConditionResolution
CONFIG_ERRORConnection settings missing or malformed.Check dockerHost and connectionType.
AUTH_FAILEDTLS handshake failed.Verify tlsCertPath certificates.
DOCKER_API_ERRORUnexpected daemon error.Check Docker daemon logs.

Output

Success Port

FieldTypeDescription
statusstring"ok" on success.
resourcestring"network"
operationstring"list"
listNetworksarrayArray of network summary objects.
listNetworks[].IdstringFull network ID (hex string).
listNetworks[].NamestringNetwork name.
listNetworks[].DriverstringNetwork driver: bridge, overlay, host, none.
listNetworks[].Scopestring"local" or "swarm".
listNetworks[].IPAMobjectIP address management config with Subnet and Gateway.
listNetworks[].OptionsobjectDriver-specific options.

Error Port

Fires when the operation fails. Output contains status: "error", errorCode, and errorMessage.

Sample Output

{
  "status": "ok",
  "resource": "network",
  "operation": "list",
  "listNetworks": [
    {
      "Id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
      "Name": "app-backend",
      "Driver": "bridge",
      "Scope": "local",
      "IPAM": {
        "Config": [{ "Subnet": "172.20.0.0/16", "Gateway": "172.20.0.1" }]
      },
      "Options": {}
    },
    {
      "Id": "b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3",
      "Name": "bridge",
      "Driver": "bridge",
      "Scope": "local",
      "IPAM": {
        "Config": [{ "Subnet": "172.17.0.0/16", "Gateway": "172.17.0.1" }]
      },
      "Options": {}
    }
  ]
}

Expression Reference

ExpressionReturns
{{ $output.listNetworks[0].Id }}ID of the first network — pass to network/connect.
{{ $output.listNetworks[0].Name }}Name of the first network.
{{ $output.listNetworks.length }}Total number of networks on the host.
{{ $output.listNetworks[0].Driver }}Driver type — use to filter for host-mode compliance check.
{{ $output.listNetworks[0].IPAM.Config[0].Subnet }}Network subnet CIDR.

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 }}.
Disconnect containers before removing networksCalling network/remove on a network with attached containers returns CONFLICT. Disconnect first.
Never use host-mode networks in productionHost-mode removes network namespace isolation. GuardRail compliance checks flag Driver: "host" networks.
Always handle the error portDaemon unavailability will route to the error port — wire it to alerting nodes.
Restrict container/exec to approved commandsArbitrary exec access is root-equivalent. GuardRail exec policies restrict allowed command prefixes.

Examples

Example 1 — Verify Network Exists Before Deploy

List all networks and confirm the application network is present before proceeding to container creation. Route to network/create if absent.

// After network/list:
{{ $output.listNetworks.some(n => n.Name === 'app-backend') }}
// true → proceed to container/create
// false → network/create first

Example 2 — Retrieve Network ID for Connection

Find a network by name and extract its ID for downstream network/connect or network/inspect calls.

// Find network by name:
{{ $output.listNetworks.find(n => n.Name === 'app-backend')?.Id }}

Example 3 — Compliance Check: No Host-Mode Networks

Assert that no network on the host uses the host driver — fail the workflow if any are found.

// Condition: should be false for compliant environments
{{ $output.listNetworks.some(n => n.Driver === 'host') }}
// If true → send compliance alert and abort workflow