Actions12
Overview
This node interacts with Docker to run Docker images as containers. It allows users to specify the Docker image, command to run inside the container, volume mounts for persistent or shared storage, and the working directory inside the container. This is useful for automating containerized workflows, running isolated tasks, or executing scripts in a controlled environment.
Use Case Examples
- Running a specific Docker image with a custom command to process data.
- Mounting host directories into the container to share files between the host and container.
- Setting a working directory inside the container to control where commands execute.
Properties
| Name | Meaning |
|---|---|
| Image | The Docker image to run as a container. |
| Command | The command to execute inside the container, specified as a JSON array. |
| Volume Mounts | Host directories or Docker volumes to mount inside the container, including host path, container path, and read-only flag. |
| Working Directory | The 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
- Docker credentials for authentication
Troubleshooting
- Ensure Docker daemon is running and accessible from the environment where the node executes.
- Verify that the Docker credentials provided are correct and have necessary permissions.
- The 'Command' property must be a valid JSON array; otherwise, an error will be thrown.
- Volume mounts require both host path and container path to be specified; missing these will cause errors.
- If the Docker image is not available locally, the node will attempt to pull it; network issues may cause pull failures.
Links
- Docker Engine API - Official Docker API documentation for interacting with Docker programmatically.
- Docker Run Command - Documentation on Docker run command options and usage.