Portal Community

When to Use

Configuration

Connection Fields

FieldTypeDefaultDescription
dockerHoststringunix:///var/run/docker.sockDocker socket path or TCP endpoint
connectionTypestringunixsocketunixsocket | tcp | tcptls
tlsCertPathstringTLS certificate directory path. Required for tcptls. optional
timeoutSecondsint30Operation timeout in seconds. optional

Operation Fields

FieldTypeRequiredDescription
resourcestringrequiredMust be container
operationstringrequiredMust be inspect
ContainerIdstringrequiredContainer ID (full or short) or container name

Sample Configuration

{
  "resource": "container",
  "operation": "inspect",
  "ContainerId": "api-service",
  "connection": {
    "dockerHost": "unix:///var/run/docker.sock",
    "connectionType": "unixsocket",
    "timeoutSeconds": 30
  }
}

Validation Errors

Error CodeTriggerResolution
MISSING_INPUTContainerId field is empty or not providedProvide a valid container ID or name. Use container/list upstream to dynamically resolve IDs.
NOT_FOUNDNo container with the given ID or name existsVerify the container name or ID. Container may have been removed.
CONFIG_ERRORDocker host connection settings are invalidCheck dockerHost format and connectionType value.
AUTH_FAILEDTLS certificate validation failed for remote hostVerify tlsCertPath contains valid cert.pem, key.pem, and ca.pem.
DOCKER_API_ERRORDocker daemon returned an unexpected errorCheck Docker daemon logs for details.

Output

Success Port

FieldTypeDescription
container.IdstringFull 64-character container ID
container.NamestringContainer name with leading /
container.State.Statusstringrunning | exited | paused | restarting
container.State.RunningbooleanWhether the container is currently running
container.State.PidintPID of the container's main process (0 if not running)
container.State.ExitCodeintExit code of the last run (0 = success)
container.State.StartedAtstringISO 8601 timestamp when container last started
container.State.FinishedAtstringISO 8601 timestamp when container last stopped
container.Config.ImagestringImage name and tag
container.Config.Envstring[]Environment variables as KEY=VALUE strings
container.Config.Cmdstring[]Container entrypoint command arguments
container.Config.LabelsobjectContainer labels
container.NetworkSettings.IPAddressstringContainer IP on the default bridge network
container.NetworkSettings.PortsobjectPort binding map
container.MountsarrayVolume and bind mount information
container.HostConfig.RestartPolicy.NamestringRestart policy: no | always | unless-stopped | on-failure
statusstringsuccess

Error Port

On failure, the error port receives errorCode, message, resource, and operation. A NOT_FOUND error is expected when checking for a container that may or may not exist — handle it with a conditional branch.

Sample Output

{
  "container": {
    "Id": "a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890",
    "Name": "/api-service",
    "Created": "2024-01-01T08:00:00.000Z",
    "State": {
      "Status": "running",
      "Running": true,
      "Paused": false,
      "Restarting": false,
      "Pid": 12345,
      "ExitCode": 0,
      "StartedAt": "2024-01-01T08:00:05.123Z",
      "FinishedAt": "0001-01-01T00:00:00Z",
      "Error": ""
    },
    "Config": {
      "Image": "myapp:v2.1.0",
      "Env": ["NODE_ENV=production", "PORT=8080", "DB_HOST=db-service"],
      "Cmd": ["node", "server.js"],
      "Labels": {
        "com.bizfirst.env": "production",
        "com.bizfirst.version": "2.1.0"
      }
    },
    "NetworkSettings": {
      "IPAddress": "172.17.0.2",
      "Ports": {
        "8080/tcp": [{ "HostIp": "0.0.0.0", "HostPort": "3000" }]
      },
      "Networks": {
        "bridge": {
          "IPAddress": "172.17.0.2",
          "Gateway": "172.17.0.1"
        }
      }
    },
    "Mounts": [
      {
        "Type": "volume",
        "Name": "api-data",
        "Source": "/var/lib/docker/volumes/api-data/_data",
        "Destination": "/app/data",
        "RW": true
      }
    ],
    "HostConfig": {
      "RestartPolicy": { "Name": "unless-stopped", "MaximumRetryCount": 0 },
      "PortBindings": {
        "8080/tcp": [{ "HostIp": "", "HostPort": "3000" }]
      }
    }
  },
  "status": "success",
  "resource": "container",
  "operation": "inspect"
}

Expression Reference

ExpressionReturns
{{ $output.container.State.Status }}Current container state string
{{ $output.container.State.Running }}Boolean — true if container is running
{{ $output.container.State.ExitCode }}Exit code of last run (0 = clean exit)
{{ $output.container.State.StartedAt }}ISO timestamp of last start
{{ $output.container.State.FinishedAt }}ISO timestamp of last stop
{{ $output.container.Config.Image }}Image name and tag currently running
{{ $output.container.NetworkSettings.IPAddress }}Container's bridge IP address
{{ $output.container.Mounts[0].Destination }}Mount path inside the container
{{ $output.container.HostConfig.RestartPolicy.Name }}Restart policy name

Node Policies & GuardRails

PolicyDetail
No remote TCP without TLSconnectionType: tcp against remote hosts is blocked in production profiles. Use tcptls.
Credentials Manager for TLS pathsReference TLS paths via {{ $credentials.dockerTlsCertPath }}.
Always wire the error portA container may not exist when checked. Handle NOT_FOUND as an expected condition in deployment workflows.
Do not log Env outputThe Config.Env array may contain sensitive values. Avoid writing inspect output to logs without first redacting env fields.
Read-only operationcontainer/inspect is non-destructive and safe to call frequently without side effects.

Examples

Example 1: Failure diagnosis workflow

After a health-check workflow detects a container is not responding, use inspect to extract the exit code and error for incident reporting.

{
  "resource": "container",
  "operation": "inspect",
  "ContainerId": "{{ $trigger.containerName }}"
}
// Then in a Function node:
const exitCode = $input.container.State.ExitCode;
const finishedAt = $input.container.State.FinishedAt;
const errorMsg = $input.container.State.Error;
return {
  incidentSummary: `Container exited with code ${exitCode} at ${finishedAt}. Error: ${errorMsg || 'none'}`
};

Example 2: IP address discovery for network automation

Retrieve the container's IP and pass it to a Cloudflare or load-balancer node to update routing rules.

// Expression in downstream Cloudflare node:
// "value": "{{ $output.container.NetworkSettings.IPAddress }}"

Example 3: Config drift detection

Compare the running container's image tag against the expected version stored in a workflow variable and escalate if they differ.

// If Condition node:
// Left:  {{ $output.container.Config.Image }}
// Op:    not equals
// Right: {{ $vars.expectedImage }}
// → true branch: trigger alert and rollback workflow