Docker icon

Docker

Interact with Docker via Portainer API

Actions107

Overview

This node allows users to interact with Docker through the Portainer API, specifically targeting a selected Docker endpoint managed by Portainer. The "Plugin Set" operation enables setting or updating a Docker plugin on the specified endpoint by providing the plugin name and an optional request body.

Common scenarios for this node include automating Docker plugin management tasks such as installing, configuring, or updating plugins on remote Docker environments managed via Portainer. For example, a user might automate the deployment of a logging or monitoring plugin across multiple Docker endpoints.

Properties

Name Meaning
EndpointID Name or ID Selects the Docker endpoint managed by Portainer where the plugin operation will be executed. Options are dynamically loaded from available endpoints.
Name The name of the Docker plugin to set. The :latest tag is optional and assumed if omitted.
Body Optional raw string content sent as the HTTP request body when setting the plugin. This can contain additional configuration or parameters in JSON or other formats.

Output

The node outputs JSON data representing the response from the Portainer API after attempting to set the Docker plugin. This typically includes details about the plugin status or confirmation of the operation's success. There is no indication that binary data is output by this node.

Dependencies

  • Requires access to a Portainer instance with its API enabled.
  • Needs an API authentication token or key configured in n8n credentials to authenticate requests to the Portainer API.
  • The node dynamically loads available Docker endpoints from Portainer to populate the endpoint selection property.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Specifying an invalid or unavailable endpoint ID will result in errors when making API calls.
    • Providing malformed JSON or incorrect data in the Body property may cause the API to reject the request.
  • Error messages:

    • Authentication errors typically indicate invalid or missing API tokens; verify credential setup.
    • Endpoint not found or inaccessible errors suggest the selected endpoint ID does not exist or the user lacks permissions.
    • API validation errors often relate to the Body content; ensure it matches expected schema or format.

Links and References

Discussion