Docker icon

Docker

Interact with Docker via Portainer API

Actions107

Overview

This node allows users to interact with Docker containers through the Portainer API. Specifically, the "Container Changes" operation retrieves the changes made to a specified Docker container. This can be useful for auditing container modifications, debugging container states, or tracking filesystem changes within containers.

Practical examples include:

  • Monitoring which files have been added, modified, or deleted inside a container.
  • Auditing container activity after deployment or during runtime.
  • Integrating container change data into automated workflows for compliance or alerting.

Properties

Name Meaning
EndpointID Name or ID The Portainer endpoint to access. Choose from a list of available endpoints or specify an ID via expression.
Id The ID or name of the Docker container whose changes you want to retrieve.

Output

The node outputs JSON data representing the changes in the specified container. This typically includes details about files that have been added, modified, or deleted inside the container's filesystem.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Portainer API instance.
  • Needs an API key credential configured in n8n to authenticate requests to the Portainer API.
  • The node uses the Portainer API endpoint /api/endpoints/{endpointId}/docker as base URL for Docker-related operations.

Troubleshooting

  • Common issues:

    • Invalid or missing endpoint ID: Ensure the selected endpoint exists and is accessible.
    • Incorrect container ID or name: Verify the container identifier is correct and the container is running or exists.
    • Authentication errors: Confirm the API key credential is valid and has sufficient permissions.
    • Network connectivity problems between n8n and the Portainer server.
  • Error messages:

    • Unauthorized or 401 errors indicate invalid credentials.
    • 404 errors may mean the endpoint or container was not found.
    • Timeout or connection refused errors suggest network or server availability issues.

Resolving these usually involves verifying credentials, endpoint/container identifiers, and network connectivity.

Links and References

Discussion