Actions88
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Network Actions
- Volume Actions
- Swarm Actions
- Node Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
Overview
This node interacts with Docker through the Portainer API, specifically allowing users to retrieve a list of Docker images from a selected Docker endpoint managed by Portainer. It is useful for scenarios where you want to programmatically access and manage Docker images across different environments or servers via Portainer's centralized API.
A practical example includes automating the retrieval of all Docker images available on a specific Docker host (endpoint) to monitor image usage, perform cleanup tasks, or integrate with CI/CD pipelines that require image metadata.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | Selects the Docker endpoint (host) managed by Portainer from which to fetch images. You can choose from a dropdown list or specify an ID using an expression. This is required. |
| Additional Fields | Optional additional filters for the request: |
| - Names | A JSON array of image names to filter the results by. For example, ["nginx", "redis"] will return only those images matching these names. |
Output
The node outputs JSON data representing the list of Docker images retrieved from the specified endpoint. Each item in the output corresponds to one Docker image and contains its metadata as returned by the Portainer API. The exact structure depends on the Portainer API response but typically includes fields like image ID, repository tags, creation date, size, etc.
No binary data output is indicated.
Dependencies
- Requires a valid Portainer API authentication token configured in the node credentials.
- Needs network access to the Portainer server URL.
- Uses the Portainer API endpoint
/api/endpoints/{endpointId}/docker/images/jsonto fetch images. - The node dynamically loads available endpoints from Portainer to populate the endpoint selection dropdown.
Troubleshooting
- Common issues:
- Invalid or missing Portainer API credentials will cause authentication errors.
- Incorrect or unavailable endpoint IDs will result in failed requests or empty results.
- Network connectivity problems between n8n and the Portainer server can cause timeouts or connection errors.
- Error messages:
- Authentication failures usually indicate invalid API tokens or insufficient permissions.
- "Endpoint not found" or similar errors suggest the specified endpoint ID does not exist or is inaccessible.
- Resolutions:
- Verify and update the API credentials.
- Confirm the endpoint ID is correct and the endpoint is active in Portainer.
- Ensure n8n has network access to the Portainer server.