Actions15
Overview
This n8n node allows you to interact with Docker resources directly from your workflows. Specifically, when using the Default resource and the Get operation, the node retrieves detailed information about a specific Docker resource (such as a container, image, volume, or network) by its ID. This is useful for automating infrastructure monitoring, auditing, or integrating Docker state into broader automation processes.
Example scenarios:
- Fetching the status of a specific Docker container by its ID.
- Retrieving metadata about a particular Docker image for reporting or validation.
- Integrating Docker resource checks into CI/CD pipelines.
Properties
Name | Meaning |
---|---|
ID | The unique identifier of the Docker resource (container, image, volume, or network) you want to retrieve. |
Output
The output is a JSON object containing the details of the requested Docker resource. The structure of this object depends on the type of resource queried (e.g., container, image, volume, or network), but typically includes metadata such as name, status, configuration, and other relevant properties.
Example output for a container:
{
"Id": "e90e34656806",
"Names": ["/my-container"],
"Image": "nginx:latest",
"State": "running",
"Status": "Up 5 minutes",
...
}
Note: The actual fields will vary depending on the resource type.
Dependencies
- Docker API: Requires access to a Docker daemon via credentials configured in n8n (
dockerCredentialsApi
). - n8n Configuration: You must set up Docker credentials in n8n for the node to connect to your Docker environment.
Troubleshooting
- No credentials got returned!
This error occurs if Docker credentials are not properly configured in n8n. Ensure that you have set up thedockerCredentialsApi
credential and that it is selected in the node. - Resource not found or invalid ID:
If you provide an incorrect or non-existent ID, the node may return an error or empty result. Double-check the ID value for accuracy. - Connection errors:
If the node cannot connect to the Docker daemon (due to network issues, misconfiguration, or permissions), you may see connection-related errors. Verify your Docker host settings and network accessibility.