Actions15
Overview
This n8n node allows you to interact with Docker resources directly from your workflows. Specifically, when using the Default resource and the List operation, the node retrieves a list of Docker entities (such as containers, images, volumes, or networks) based on the provided options. This is useful for automating infrastructure monitoring, inventorying Docker assets, or integrating Docker state into broader automation processes.
Example scenarios:
- Listing all running Docker containers to monitor their status.
- Retrieving available Docker images before deploying new services.
- Auditing Docker volumes or networks in an automated fashion.
Properties
Name | Meaning |
---|---|
Options | Additional parameters for the list operation, provided as a JSON object. The structure and effect depend on the specific Docker resource being listed (e.g., filters, limits). |
Output
The output is a JSON array containing information about the listed Docker resources. Each item in the array represents a single Docker entity (container, image, volume, or network), with fields corresponding to the properties returned by the Docker API for that resource type.
Example output for listing containers:
[
{
"Id": "e90e34656806",
"Names": ["/my-container"],
"Image": "nginx:latest",
"State": "running",
"Status": "Up 5 minutes"
// ...other Docker container fields
}
]
Note: The exact fields depend on the resource type and Docker's API response.
Dependencies
- Docker Engine: The node requires access to a Docker daemon via the
dockerode
library. - Credentials: You must configure Docker credentials in n8n (
dockerCredentialsApi
) to allow the node to connect to your Docker instance.
Troubleshooting
Missing Credentials:
Error message:No credentials got returned!
Resolution: Ensure that valid Docker credentials are configured and selected in the node.Invalid Options Format:
If theOptions
property contains invalid JSON, the node may fail.
Resolution: Double-check that theOptions
field contains properly formatted JSON.Connection Issues:
If the node cannot connect to the Docker daemon, check your Docker host settings and network connectivity.