Actions72
- Image Actions
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Stack Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Overview
This node integrates with the Portainer API to manage Docker images, specifically enabling the "Pull" operation for Docker images. It allows users to pull a Docker image from a registry into a specified Docker environment managed by Portainer.
Common scenarios where this node is beneficial include:
- Automating the deployment pipeline by pulling updated Docker images before container creation or update.
- Managing multiple Docker environments/endpoints centrally via Portainer.
- Integrating image management into workflows that require dynamic image updates.
Practical example:
- Pulling the latest
nginximage from Docker Hub into a specific Docker environment identified by its environment ID, preparing it for container creation or service deployment.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Portainer environment/endpoint where the image will be pulled. |
| Image Name | The name of the Docker image to pull (e.g., nginx). |
| Image Tag | The tag of the Docker image to pull (default is latest). |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to pull the image. This typically includes details about the pull operation status and any metadata returned by the Docker daemon via Portainer.
No binary data output is involved in this operation.
Dependencies
- Requires an active Portainer instance accessible via its API.
- Requires an API key credential configured in n8n to authenticate requests to the Portainer API.
- The node uses the Portainer API endpoint
/endpoints/{environmentId}/docker/images/createwith a POST request to perform the pull operation.
Troubleshooting
Common issues:
- Invalid or missing Environment ID: Ensure the environment ID corresponds to a valid Portainer endpoint.
- Incorrect image name or tag: Verify the image name and tag exist in the target registry.
- Authentication errors: Confirm the API key credential has sufficient permissions.
- Network connectivity issues between n8n and the Portainer server.
Error messages:
- HTTP 401 Unauthorized: Check API key validity and permissions.
- HTTP 404 Not Found: The specified environment or image does not exist.
- HTTP 500 Internal Server Error: Possible issues on the Portainer server side; check server logs.
Resolving these usually involves verifying credentials, network access, and correctness of input parameters.