Build a Docker image
Building images with Bitbucket Pipelines
When building Docker images, use pipelines as much as possible. This example assumes that you are using the default Atlassian builder image in this example.
To publish a new image to AWS Elastic Container Registry (ECR), for example, use the following sample code to publish a new image when the repo is tagged:
name: Publish New Image
# oidc: true indicates that OIDC authentication has been enabled.
- docker build . -t $BITBUCKET_REPO_SLUG
- pipe: atlassian/aws-ecr-push-image:1.6.2
TAGS: "latest $BITBUCKET_TAG"