Docker icon

Docker

Interact with Docker via Portainer API

Overview

This node allows users to interact with Docker through the Portainer API, specifically focusing on managing Docker secrets. The "Secret Inspect" operation retrieves detailed information about a specific Docker secret by its ID within a selected Docker endpoint managed by Portainer.

Common scenarios for this node include:

  • Retrieving metadata and configuration details of Docker secrets used in container deployments.
  • Auditing or verifying secret contents and attributes without exposing sensitive data.
  • Integrating secret inspection into automated workflows for compliance or deployment validation.

For example, a user might use this node to fetch the details of a secret before updating or rotating it, ensuring that the correct secret is targeted.

Properties

Name Meaning
EndpointID Name or ID Selects the Docker endpoint (Portainer environment) where the secret resides. Options are dynamically loaded from available endpoints.
Id The unique identifier of the Docker secret to inspect. This is a required string input specifying which secret's details to retrieve.

Output

The node outputs JSON data representing the inspected Docker secret's details as returned by the Portainer API. This typically includes fields such as the secret's ID, name, creation date, labels, and other metadata relevant to the secret's configuration and usage within Docker.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Portainer instance with the Docker endpoints configured.
  • Needs an API key credential for authenticating requests against the Portainer API.
  • The node depends on the Portainer API being accessible at the URL specified in the credentials.
  • The endpointId must correspond to a valid Docker endpoint registered in Portainer.

Troubleshooting

  • Invalid Endpoint or Secret ID: If the provided endpoint ID or secret ID does not exist or is incorrect, the node will likely return an error indicating resource not found. Verify IDs are correct and that the endpoint is reachable.
  • Authentication Errors: Ensure the API key credential is valid and has sufficient permissions to access the Docker endpoint and secrets.
  • Network Issues: Connectivity problems between n8n and the Portainer API can cause request failures. Check network settings and API availability.
  • Empty or Missing Output: Confirm that the secret ID corresponds to an existing secret; otherwise, no data will be returned.

Links and References

Discussion