Docker icon

Docker

Interact with Docker via Portainer API

Actions107

Overview

This node enables a Docker plugin on a specified Portainer endpoint by interacting with the Portainer API. It is useful for automating container management tasks, such as activating plugins that extend Docker's functionality within a Portainer-managed environment. For example, you might use this node to programmatically enable monitoring or logging plugins on your Docker endpoints without manual intervention.

Properties

Name Meaning
EndpointID Name or ID The identifier of the Portainer endpoint where the Docker plugin will be enabled. You can select from a list of available endpoints or specify an ID using an expression.
Name The name of the Docker plugin to enable. The :latest tag is optional and assumed if omitted.
Additional Fields Optional extra parameters; currently supports:
- Timeout: HTTP client timeout in seconds for the request to enable the plugin.

Output

The node outputs JSON data representing the response from the Portainer API after attempting to enable the specified Docker plugin on the chosen endpoint. This typically includes status information about the operation. There is no binary output.

Dependencies

  • Requires access to a Portainer instance with its API enabled.
  • Needs an API authentication token credential configured in n8n to authorize requests to the Portainer API.
  • The node uses the Portainer API endpoint /api/endpoints/{endpointId}/docker as the base URL for requests.
  • The endpointId must correspond to a valid Portainer endpoint accessible by the API credentials.

Troubleshooting

  • Invalid Endpoint ID: If the provided endpoint ID does not exist or is inaccessible, the node will fail. Verify the endpoint ID is correct and the API credentials have permission.
  • Plugin Not Found: Specifying a plugin name that does not exist or is misspelled may cause errors. Ensure the plugin name matches exactly, including tags like :latest if used.
  • Timeouts: If the request times out, consider increasing the "Timeout" additional field value.
  • Authentication Errors: Ensure the API key or token credential is valid and has sufficient permissions to modify plugins on the target endpoint.
  • API Changes: If the Portainer API changes, the node may require updates to remain compatible.

Links and References

Discussion