Push Docker image
In this guide we show how to automatically push built Docker images to the selected Docker registry.
Image loading...
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...
- 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...
- Next, add the Build Image action that will create the image using the instructions from your Dockerfile:
Image loading...
- Now, it's time to add the Push Image action that will release your application to the selected registry:
Image loading...
- 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...
- 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_RUN_TAG
variable to automatically tag the images with the tags created in your repository, one of default environment variables you can use.
Image loading...
Last modified on Oct 29, 2024
Recommended