Actions15
Overview
This node interacts with Docker to run commands inside Docker volumes. Specifically, for the 'Volume' resource and 'Run' operation, it pulls a specified Docker image and runs a given command array inside a container created from that image with auto-remove enabled. This is useful for automating Docker volume operations, running scripts or commands in isolated environments, and integrating Docker workflows within n8n automation.
Use Case Examples
- Running a database migration script inside a Docker volume using a specific image.
- Executing a backup command inside a Docker volume environment.
Properties
| Name | Meaning |
|---|---|
| Image | The Docker image to pull and run the command in. |
| Command | The command to run inside the Docker container, provided as a JSON array of strings. |
Output
JSON
stdout- Standard output from the Docker container command execution.stderr- Standard error output from the Docker container command execution.
Dependencies
- Requires Docker API credentials to authenticate and interact with the Docker daemon.
Troubleshooting
- Ensure Docker credentials are correctly configured; otherwise, the node throws 'No credentials got returned!' error.
- The 'Command' property must be a valid JSON array; otherwise, it throws 'Command must be an array!' error.
- Docker daemon must be accessible and running for the node to pull images and run commands.
- If the specified image does not exist or cannot be pulled, the operation will fail.