Docker icon

Docker

Interact with Docker via Portainer API

Actions107

Overview

This node enables upgrading a Docker plugin on a specified endpoint managed via the Portainer API. It is useful in scenarios where you want to automate the management and upgrade of Docker plugins across your container environments. For example, you can use this node to programmatically update a plugin to its latest version or a specific remote tag, ensuring your Docker environment uses the most recent features or security patches.

Properties

Name Meaning
EndpointID Name or ID The target Docker endpoint where the plugin upgrade will be performed. You can select from a list of available endpoints or specify an ID directly using an expression.
Name The name of the plugin to upgrade. The :latest tag is optional and assumed if omitted.
Remote The remote reference (tag) to upgrade the plugin to. The :latest tag is optional and used as the default if omitted. This typically refers to the plugin version or repository tag.
Body Optional raw string body content to send with the upgrade request.
Additional Fields A collection of optional additional fields. Currently supports:
- X Registry Auth: A base64url-encoded authentication configuration used when pulling a plugin from a registry. Useful for private registries.

Output

The node outputs JSON data representing the response from the Portainer API after attempting the plugin upgrade. This typically includes status information about the upgrade operation, such as success confirmation or error details. There is no binary output.

Dependencies

  • Requires access to a Portainer API endpoint managing Docker environments.
  • Needs an API key or token credential configured in n8n to authenticate requests to the Portainer API.
  • The node dynamically loads available endpoints from the Portainer API to populate the "EndpointID" property.

Troubleshooting

  • Common issues:

    • Invalid or missing endpoint ID: Ensure the selected endpoint exists and is accessible.
    • Authentication errors: Verify that the API key/token credential is valid and has sufficient permissions.
    • Plugin not found or invalid plugin name: Confirm the plugin name is correct and available on the target endpoint.
    • Registry authentication failures: If pulling from a private registry, ensure the X Registry Auth field is correctly base64url-encoded and valid.
  • Error messages:

    • HTTP 401 Unauthorized: Check API credentials and permissions.
    • HTTP 404 Not Found: The specified plugin or endpoint does not exist.
    • HTTP 400 Bad Request: Likely due to malformed input, such as incorrect plugin name or invalid body content.

Links and References

Discussion