Actions72
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Stack Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
Overview
This node integrates with the Portainer API to manage Docker images, specifically allowing users to create new tags for existing Docker images. Tagging an image is useful when you want to assign a new identifier (tag) to an image, for example, to mark a version or prepare it for pushing to a different repository.
Common scenarios include:
- Organizing images by tagging them with version numbers or environment labels (e.g.,
v1.0,production). - Preparing images for deployment pipelines by tagging before pushing to registries.
- Managing multiple repositories and tags for the same base image.
Example: You have an image with ID abc123def456 and want to tag it as myrepo/myapp:stable. This node operation will create that tag in Portainer's Docker environment.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Portainer environment/endpoint where the Docker image resides. |
| Image ID | The unique identifier of the Docker image to be tagged. |
| Repository | The name of the repository to which the new tag will be applied. |
| New Tag | The new tag name to assign to the image (e.g., latest, v1.0, stable). |
Output
The output JSON contains the response from the Portainer API after attempting to tag the image. Typically, this will confirm success or provide details about the created tag. The exact structure depends on the Portainer API response but generally includes status information.
No binary data output is involved in this operation.
Dependencies
- Requires a valid Portainer API key credential configured in n8n.
- Needs the base URL of the Portainer instance to send API requests.
- The node uses the Portainer REST API endpoint for Docker image tagging.
Troubleshooting
- Invalid Environment ID or Image ID: If these IDs are incorrect or do not exist, the API call will fail. Verify the IDs correspond to actual resources in your Portainer environment.
- Insufficient Permissions: Ensure the API key used has permissions to tag images in the specified environment.
- Repository or Tag Format Errors: The repository and tag names must follow Docker naming conventions; invalid names may cause errors.
- Network Issues: Connectivity problems to the Portainer API endpoint will prevent the operation from succeeding.
Common error messages might include HTTP 404 (resource not found), 401 (unauthorized), or 400 (bad request). Check credentials, resource IDs, and parameter formats to resolve these.