Docker icon

Docker

Interact with Docker

Actions15

Overview

This n8n node allows you to interact with Docker resources. Specifically, when configured for the Network resource and the List operation, it retrieves a list of Docker networks available on the connected Docker host. This is useful for automating infrastructure management tasks, monitoring network configurations, or integrating Docker network data into broader workflows.

Example scenarios:

  • Automatically inventorying all Docker networks as part of a DevOps pipeline.
  • Auditing network configurations before deploying new containers.
  • Integrating Docker network information into IT dashboards.

Properties

Name Meaning
Options Additional options for listing Docker networks, provided as a JSON object. These options are passed directly to the Docker API's network listing method and can be used to filter or modify the results.

Output

The output is a JSON array where each item represents a Docker network object as returned by the Docker API. Each object typically includes fields such as:

{
  "Name": "bridge",
  "Id": "e9b1c7...",
  "Created": "2023-01-01T12:00:00.000Z",
  "Scope": "local",
  "Driver": "bridge",
  "EnableIPv6": false,
  "IPAM": { ... },
  "Internal": false,
  "Attachable": true,
  "Ingress": false,
  "ConfigFrom": { ... },
  "ConfigOnly": false,
  "Containers": { ... },
  "Options": { ... },
  "Labels": { ... }
}

The exact structure may vary depending on your Docker version and configuration.

Dependencies

  • Docker Host: Requires access to a running Docker daemon.
  • Credentials: You must configure dockerCredentialsApi in n8n to connect to your Docker host (e.g., via socket or TCP).
  • n8n Configuration: No additional environment variables are required beyond Docker credentials.

Troubleshooting

  • No credentials got returned!
    This error occurs if the node cannot retrieve Docker credentials. Ensure that the dockerCredentialsApi credential is set up correctly in n8n.

  • Invalid Options JSON
    If the "Options" property contains invalid JSON, the node may fail. Double-check your input for correct JSON syntax.

  • Connection errors
    If the node cannot connect to Docker, verify that the Docker daemon is running and accessible from the n8n instance, and that your credentials are correct.

Links and References

Discussion