Actions15
Overview
This node interacts with Docker to perform operations on Docker resources. Specifically, for the 'Container' resource with the 'Run' operation, it pulls a specified Docker image and runs a container with a given command. This is useful for automating container execution workflows, such as running scripts or applications inside Docker containers directly from n8n.
Use Case Examples
- Run a container from a specific image with a custom command to automate deployment tasks.
- Execute a batch job inside a Docker container by specifying the image and command array.
Properties
| Name | Meaning |
|---|---|
| Image | The Docker image to pull and run the container from. |
| Command | The command to execute inside the running container, provided as a JSON array. |
Output
JSON
stdout- Standard output from the container run command.stderr- Standard error output from the container run command.
Dependencies
- Docker API accessed via dockerode library
- Requires Docker API credentials
Troubleshooting
- Error 'No credentials got returned!' indicates missing or invalid Docker API credentials; ensure credentials are properly configured.
- Error 'Command must be an array!' occurs if the command input is not a valid JSON array; provide the command as a JSON array string.
- Docker image pull failures may occur if the image name is incorrect or the Docker daemon is not accessible; verify image name and Docker service status.
Links
- Docker Engine API - Official Docker API documentation for understanding Docker operations.
- dockerode GitHub Repository - Node.js Docker API client used by this node for Docker interactions.