Docker icon

Docker

Interact with Docker via Portainer API

Overview

This node allows interaction with Docker through the Portainer API. It is designed to facilitate managing Docker resources by sending requests to a specified Docker endpoint managed by Portainer. Common use cases include automating container management, retrieving Docker resource information, and integrating Docker operations into workflows without manual API calls.

For example, you can use this node to list containers, start or stop containers, or inspect Docker images on a remote Docker host managed via Portainer.

Properties

Name Meaning
EndpointID Name or ID The identifier of the Docker endpoint managed by Portainer to which API requests will be sent. You can select from a list of available endpoints or specify an ID using an expression.

Output

The node outputs JSON data corresponding to the response received from the Portainer Docker API for the requested operation. This typically includes details about Docker resources such as containers, images, networks, or volumes depending on the specific API call made internally.

No binary data output is indicated in the source code.

Dependencies

  • Requires access to a Portainer instance with its API enabled.
  • Requires an API key credential for authenticating with the Portainer API.
  • The node uses the base URL and authentication credentials configured in n8n to communicate with the Portainer API.
  • The node dynamically loads available Docker endpoints from Portainer to populate the "EndpointID" property.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Specifying an invalid or inaccessible endpoint ID will result in errors when making API requests.
    • Network connectivity issues between n8n and the Portainer server can cause request timeouts or failures.
  • Error messages:

    • Authentication errors usually indicate invalid or expired API tokens; verify and update credentials.
    • "Endpoint not found" or similar errors suggest the selected endpoint ID does not exist or is not accessible; check the endpoint list in Portainer.
    • HTTP errors related to connectivity should prompt checking network settings and firewall rules.

Links and References

Discussion