Docker icon

Docker

Interact with Docker

Actions15

Overview

This node interacts with Docker to perform various operations on resources such as containers, images, volumes, and networks. Specifically, for the Image resource and the List operation, the node retrieves a list of Docker images available in the connected Docker environment. This is useful for scenarios where you need to enumerate all images, automate image management tasks, or integrate Docker image data into broader workflows.

Practical examples:

  • Displaying all available Docker images before running a container.
  • Auditing or reporting on Docker images present in an environment.
  • Triggering further automation based on the presence or absence of specific images.

Properties

Name Meaning
Options Additional options for listing images, provided as a JSON object.

Output

The output is a JSON array where each item represents a Docker image. Each object typically contains details such as:

{
  "Id": "sha256:...",
  "RepoTags": ["repository:tag"],
  "Created": 1234567890,
  "Size": 12345678,
  // ...other Docker image properties
}

The exact fields depend on the Docker API response for listing images.

Dependencies

  • Docker Daemon: The node requires access to a Docker daemon (local or remote).
  • Credentials: You must configure dockerCredentialsApi credentials in n8n to connect to your Docker instance.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common issues:

  • Missing Credentials:
    Error: No credentials got returned!
    Resolution: Ensure that valid Docker credentials are configured and selected in the node.

  • Invalid Options JSON:
    If the Options property is not a valid JSON object, the node may fail.
    Resolution: Double-check the syntax of the JSON entered in the Options field.

  • Docker Connection Errors:
    Errors connecting to Docker (e.g., connection refused, authentication failed).
    Resolution: Verify Docker is running and accessible from the n8n host, and credentials are correct.

Links and References

Discussion