Actions86
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Environment Actions
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Setting Actions
- Stack Actions
- System Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Image → Build
AI-generatedOverview
This node operation allows users to build a Docker image from a Dockerfile using the Portainer API. It is useful for automating the process of creating Docker images within a CI/CD pipeline or container management workflow. For example, a user can specify the environment ID, image tag, and provide the build context (tar archive of the Dockerfile and related files) to build a new image programmatically.
Use Case Examples
- Building a custom Docker image from a Dockerfile stored in a repository or local context.
- Automating image builds as part of a deployment pipeline to ensure the latest application version is containerized.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the environment/endpoint in Portainer where the image will be built. |
| Image Tag | The tag to assign to the built image, e.g., 'latest'. |
| Request Options | Additional request options such as batching, SSL certificate validation, proxy settings, and timeout configuration. |
Output
JSON
body- The response body from the Portainer API after building the image, typically containing build status or result information.
Dependencies
- Portainer API with an API key credential for authentication
Troubleshooting
- Ensure the environment ID is correct and accessible in Portainer to avoid authorization or connection errors.
- Verify the build context is correctly formatted as a tar archive and includes a valid Dockerfile; otherwise, the build will fail.
- Check that the image tag is valid and does not conflict with existing images unless overwriting is intended.
- If SSL errors occur, consider enabling the 'Ignore SSL Issues' option if using self-signed certificates.
Links
- Portainer API - Build Image - Official Portainer API documentation for building Docker images.