Docker icon

Docker

Interact with Docker

Actions15

Overview

This node allows interaction with Docker environments by performing operations such as retrieving details of specific Docker resources, listing multiple resources, or running Docker containers. The "Get" operation fetches detailed information about a single Docker resource identified by its ID. This is useful for scenarios where you need to inspect the state or configuration of a particular container, image, volume, or network within your Docker setup.

Practical examples include:

  • Retrieving the status and metadata of a specific Docker container by its ID.
  • Fetching detailed information about a Docker image to verify tags or layers.
  • Inspecting a Docker volume or network configuration.

Properties

Name Meaning
ID The unique identifier of the Docker resource (container, image, volume, or network) to retrieve details for.

Note: The "ID" property is shown only when the "Get" operation is selected.

Output

The node outputs an array of JSON objects representing the retrieved Docker resource's details. Each object contains the full metadata and state information returned by the Docker API for the specified resource.

For example, when getting a container, the output JSON includes properties like container ID, image, status, ports, mounts, and other configuration details.

No binary data output is produced by this node.

Dependencies

  • Requires a valid Docker environment accessible via the Docker API.
  • Needs credentials that provide access to the Docker daemon (e.g., a Docker socket or remote API authentication).
  • The node uses the dockerode library internally to communicate with Docker.

Troubleshooting

  • No credentials got returned!
    This error indicates missing or invalid Docker credentials. Ensure that the node has been configured with proper access to the Docker environment.

  • Command must be an array! (relevant for "Run" operation)
    If using the run operation, ensure the command input is a valid JSON array.

  • Connection errors may occur if the Docker daemon is not reachable or permissions are insufficient. Verify Docker is running and accessible from the n8n host.

Links and References

Discussion