Docker icon

Docker

Interact with Docker

Actions15

Overview

This n8n node allows you to interact with Docker resources. Specifically, when configured for the Image resource and the Get operation, it retrieves detailed information about a specific Docker image by its ID. This is useful in automation scenarios where you need to inspect or process metadata of Docker images as part of your workflow.

Practical examples:

  • Automatically fetch details of a newly built Docker image after a CI/CD pipeline step.
  • Retrieve image metadata before deploying containers to ensure correct versions are used.
  • Audit or log Docker image properties for compliance or inventory purposes.

Properties

Name Meaning
ID The unique identifier (ID) of the Docker image you want to retrieve information about.

Output

The output is a JSON object containing the details of the specified Docker image. The structure typically includes fields such as:

{
  "Id": "sha256:...",
  "RepoTags": ["repository:tag"],
  "Created": 1234567890,
  "Size": 12345678,
  "VirtualSize": 12345678,
  "Labels": { "key": "value" },
  ...
}

Note: The exact fields depend on the Docker API response for image inspection.

Dependencies

  • Docker Daemon/API: The node requires access to a Docker daemon via the provided credentials.
  • Credentials: You must configure dockerCredentialsApi in n8n with connection details to your Docker host.

Troubleshooting

  • No credentials got returned!
    This error occurs if the required Docker credentials are not set up or selected. Ensure that valid Docker credentials are configured in n8n.

  • Invalid Image ID
    If the provided ID does not correspond to an existing image, the node may return an error from the Docker API. Double-check the image ID.

  • Connection Issues
    Errors related to network or authentication failures indicate problems connecting to the Docker daemon. Verify your Docker host is reachable and credentials are correct.

Links and References

Discussion