Actions15
Overview
This node allows interaction with Docker through three main operations: Get, List, and Run. Specifically, the List operation retrieves lists of Docker resources such as containers, images, volumes, or networks based on user-supplied options. This is useful for scenarios where you want to programmatically query your Docker environment to get an overview of existing resources.
Practical examples include:
- Listing all running or stopped containers with specific filters.
- Retrieving all available Docker images on a host.
- Getting details about Docker volumes or networks for monitoring or management purposes.
Properties
| Name | Meaning |
|---|---|
| Options | A JSON object specifying parameters or filters to customize the list operation results. |
The Options property accepts a JSON object that is passed directly to the Docker API's list method for the selected resource. This can include filters like status, label selectors, or other Docker-specific query parameters.
Output
The node outputs an array of JSON objects representing the Docker resources retrieved by the list operation. Each item corresponds to one resource (e.g., a container, image, volume, or network) with its detailed properties as returned by the Docker API.
There is no binary data output from this node.
Dependencies
- Requires a valid Docker API credential to connect to the Docker daemon.
- The node uses the
dockerodelibrary internally to communicate with Docker. - The Docker environment must be accessible from where n8n is running (e.g., local Docker socket or remote Docker API endpoint).
Troubleshooting
No credentials got returned!
This error occurs if the node cannot retrieve the required Docker API credentials. Ensure that the credentials are properly configured in n8n before executing the node.Invalid JSON in Options
Since theOptionsproperty expects a JSON object, providing malformed JSON will cause errors. Validate the JSON syntax before running the node.Docker connection issues
If the node fails to connect to Docker, verify that the Docker daemon is running and accessible, and that the provided credentials have sufficient permissions.