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 when connectionType is tcptls. optional
timeoutSecondsint30Operation timeout in seconds. optional

Operation Fields

FieldTypeRequiredDescription
resourcestringrequiredMust be container
operationstringrequiredMust be list
  container/list requires no operation-specific input fields. By default it returns all containers (running, stopped, paused). To filter by state, use an If Condition or Function node downstream to filter the output array.

Sample Configuration

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

Validation Errors

Error CodeTriggerResolution
CONFIG_ERRORDocker host URL is malformed or emptyCheck dockerHost value. Unix socket must start with unix://.
AUTH_FAILEDTLS certificate validation failedVerify tlsCertPath points to valid cert/key/ca files.
DOCKER_API_ERRORDocker daemon is not running or socket is inaccessibleCheck that Docker daemon is running. Verify socket file permissions.
UNKNOWN_ROUTEresource or operation value is incorrectEnsure both fields are exactly container and list.

Output

Success Port

FieldTypeDescription
listContainersarrayArray of container summary objects (one per container)
listContainers[n].IdstringFull container ID (64-character hex)
listContainers[n].Namesstring[]Container name(s) — includes leading /
listContainers[n].ImagestringImage name and tag used to create the container
listContainers[n].StatusstringHuman-readable status string (e.g. Up 3 hours)
listContainers[n].StatestringMachine-readable state: running | exited | paused | restarting
listContainers[n].CreatednumberUnix timestamp of container creation
listContainers[n].PortsarrayPort mapping objects — PrivatePort, PublicPort, Type
listContainers[n].LabelsobjectKey-value label pairs applied to the container
statusstringsuccess
resourcestringcontainer
operationstringlist

Error Port

On failure the error port receives an object with errorCode (string), message (string), resource, and operation. Always connect the error port to a notification or retry node.

Sample Output

{
  "listContainers": [
    {
      "Id": "a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890",
      "Names": ["/api-service"],
      "Image": "myapp:v2.1.0",
      "ImageID": "sha256:abc123...",
      "Command": "node server.js",
      "Status": "Up 3 hours",
      "State": "running",
      "Created": 1704067200,
      "Ports": [
        { "PrivatePort": 8080, "PublicPort": 3000, "Type": "tcp", "IP": "0.0.0.0" }
      ],
      "Labels": {
        "com.bizfirst.env": "production",
        "com.bizfirst.service": "api"
      },
      "NetworkSettings": {
        "Networks": {
          "bridge": { "IPAddress": "172.17.0.2" }
        }
      }
    },
    {
      "Id": "b2c3d4e5f6a71234567890abcdef1234567890abcdef1234567890abcdef1234",
      "Names": ["/worker-job-42"],
      "Image": "myworker:latest",
      "Command": "python worker.py",
      "Status": "Exited (0) 2 hours ago",
      "State": "exited",
      "Created": 1704060000,
      "Ports": [],
      "Labels": { "com.bizfirst.env": "production" }
    }
  ],
  "status": "success",
  "resource": "container",
  "operation": "list"
}

Expression Reference

ExpressionReturns
{{ $output.listContainers.length }}Total number of containers returned
{{ $output.listContainers[0].Id }}ID of the first container in the list
{{ $output.listContainers[0].State }}State of the first container: running, exited, etc.
{{ $output.listContainers[0].Names[0] }}Name of the first container (e.g. /api-service)
{{ $output.listContainers[0].Image }}Image tag of the first container
{{ $output.listContainers[0].Ports[0].PublicPort }}First exposed public port number
{{ $output.listContainers[0].Labels['com.bizfirst.env'] }}Value of a specific container label
{{ $output.listContainers.filter(c => c.State === 'exited') }}Array of exited containers only

Node Policies & GuardRails

PolicyDetail
No remote TCP without TLSUsing connectionType: tcp against a remote host is blocked in production GuardRail profiles. Use tcptls.
Credentials Manager for TLS pathsSet tlsCertPath via {{ $credentials.dockerTlsCertPath }}. Hard-coded paths are flagged by static analysis.
Always wire the error portIf the Docker daemon is unreachable, the success port will not fire. An unhandled error port causes silent workflow failure.
Downstream filtering onlyThis operation returns all containers. Apply state and name filters in a subsequent Function or If Condition node — do not rely on Docker API filter parameters for security decisions.
Read-only operationcontainer/list is non-destructive. It can be safely polled on a schedule without side effects.

Examples

Example 1: Alert on exited containers

A scheduled workflow runs every 5 minutes, lists all containers, filters for those in the exited state, and sends a Slack alert for each one found.

// Function node downstream of container/list
const exited = $input.listContainers.filter(c => c.State === 'exited');
if (exited.length === 0) return { alert: false };
return {
  alert: true,
  count: exited.length,
  containers: exited.map(c => ({
    name: c.Names[0],
    image: c.Image,
    status: c.Status
  }))
};

Example 2: Deployment verification

After a blue-green deploy, list containers and confirm the new image tag is running before removing the old container.

// If Condition node checks:
// $output.listContainers.some(c => c.Image === 'myapp:v2.2.0' && c.State === 'running')
// → true: proceed to remove old container
// → false: trigger rollback workflow

Example 3: Container inventory report

Build a daily inventory CSV by listing all containers and extracting key fields into a data mapping node.

// Data Mapping node expression for each row:
{
  "id": "{{ $output.listContainers[$index].Id.substring(0, 12) }}",
  "name": "{{ $output.listContainers[$index].Names[0] }}",
  "image": "{{ $output.listContainers[$index].Image }}",
  "state": "{{ $output.listContainers[$index].State }}",
  "created": "{{ new Date($output.listContainers[$index].Created * 1000).toISOString() }}"
}