Actions12
Overview
This node interacts with Docker to run containers with specified configurations. It is useful for automating container execution workflows, such as running a containerized application with custom commands, mounting volumes, and setting the working directory inside the container. For example, it can run a Docker container with a specific image, execute commands inside it, and mount host directories or Docker volumes to the container for persistent storage or data sharing.
Use Case Examples
- Run a Docker container with the 'ubuntu' image, execute a shell command, and mount a host directory to the container.
- Run a container with a specific working directory and volume mounts for data persistence.
Properties
| Name | Meaning |
|---|---|
| Image | The Docker image to use for running the container. |
| Command | The command to execute inside the container, provided as a JSON array. |
| Volume Mounts | Host directories or Docker volumes to mount into the container, including host path, container path, and read-only flag. |
| Working Directory | Working directory inside the container where commands will be executed. |
Output
JSON
stdout- Standard output from the container run command.stderr- Standard error output from the container run command.
Dependencies
- Docker daemon accessible via Docker API
- An API key credential for Docker authentication
Troubleshooting
- Ensure Docker daemon is running and accessible from the environment where the node executes.
- Verify that the Docker image name is correct and available in the Docker registry or locally.
- The 'Command' property must be a valid JSON array; otherwise, an error 'Command must be an array!' will be thrown.
- Volume mounts require both 'Host Path' and 'Container Path' to be non-empty; missing these will cause a 'Volume mount configuration error'.
- Check permissions for mounting host paths to avoid access denied errors.