Docker icon

Docker

Interact with Docker

Actions15

Overview

This node interacts with Docker to perform operations such as getting details of a specific Docker resource, listing Docker resources, or running Docker containers. It is useful for automating Docker management tasks within workflows, such as retrieving container information by ID, listing all images, or running a container with specified commands.

Use Case Examples

  1. Get details of a Docker container by its ID to monitor or log its status.
  2. List all Docker images available on the host to manage or clean up unused images.
  3. Run a Docker container with a specific image and command to automate deployment or testing.

Properties

Name Meaning
ID The unique identifier of the Docker resource (e.g., container, image, volume, or network) to retrieve details for when using the 'Get' operation.

Output

JSON

  • containerId - The ID of the Docker container (or other resource) retrieved or affected.
  • name - The name of the Docker resource.
  • status - The current status of the Docker resource.
  • image - The Docker image associated with the container (if applicable).
  • created - Timestamp when the Docker resource was created.

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.
  • If 'Command must be an array!' error occurs, verify that the 'Command' input is a valid JSON array when running a container.
  • Docker API errors may occur if the Docker daemon is not running or accessible; verify Docker service status and network connectivity.

Links

Discussion