Push Docker image
In this guide we show how to automatically push built Docker images to the selected Docker registry.
Image loading...Example pipeline with multiple push actions
Configuration
Success
The example below shows how to configure a pipeline which only pushes tagged Docker images.
- Select your Git provider (GitHub, Bitbucket, GitLab, or private) and the repository from which Buddy should fetch the code:
Image loading...Selecting repository with source code for Docker image
- Add a new pipeline and set the trigger mode to On events → Git push.
- Set the code scope to Wildcard and customize the
refs/tags
pattern according to your workflow.
Setting the pattern to refs/tags/v*
will only deploy the tags starting with v
: v1
, v1.1
, v2
, and so on.
Image loading...Configuring wildcard in Buddy pipeline
- Next, add the Build Image action that will create the image using the instructions from your Dockerfile:
Image loading...List of Docker actions in Buddy
- Now, it's time to add the Push Image action that will release your application to the selected registry:
Image loading...Docker action configuration
- The next step is selecting the registry. Buddy integrates with Docker Hub, Amazon ECR, Google GCR, and Google Artifact Registry. You can also use a private registry, if you develop Docker internally:
Image loading...Selecting Docker registry
- Finally, determine the URL to the image in the registry and the tag with which it will be pushed.
Hint
You can use the
$BUDDY_EXECUTION_TAG
variable to automatically tag the images with the tags created in your repository, one of default environment variables you can use.
Image loading...Tagging Docker image
Recommended
Last update:
Sep 26, 2024
Sep 26, 2024