Actions15
Overview
This n8n node allows you to interact with Docker containers directly from your workflows. Specifically, when using the Container resource and the Get operation, the node retrieves detailed information about a specific Docker container by its ID. This is useful for monitoring, auditing, or integrating container status and metadata into automated processes.
Practical examples:
- Fetching the current state (running, stopped, etc.) of a container as part of a deployment pipeline.
- Retrieving container details for logging or alerting purposes.
- Integrating container metadata into other systems via n8n.
Properties
Name | Meaning |
---|---|
ID | The unique identifier of the Docker container you want to retrieve information about. |
Output
The output is a JSON object containing detailed information about the specified Docker container. The structure typically includes fields such as:
{
"Id": "string",
"Names": ["string"],
"Image": "string",
"ImageID": "string",
"Command": "string",
"Created": 0,
"State": "string",
"Status": "string",
// ...other Docker container properties
}
Note: The exact fields depend on the Docker API response for the container.
Dependencies
- Docker Engine: The node requires access to a Docker daemon.
- Credentials: You must configure
dockerCredentialsApi
in n8n with connection details for your Docker instance. - External Libraries: Uses the
dockerode
npm package for Docker communication.
Troubleshooting
No credentials got returned!
This error occurs if the node cannot find valid Docker credentials. Ensure that thedockerCredentialsApi
credential is set up correctly in n8n.Invalid Container ID
If the provided ID does not match any existing container, the node will return an error from the Docker API. Double-check the container ID.Connection Errors
If the node cannot connect to the Docker daemon (e.g., due to network issues or incorrect credentials), it will fail. Verify Docker is running and accessible from the n8n host.