Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

bitbucket-pipelines, build using ACR

Hi, I have tried to solve this problem but have failed.

I need to build a docker image using bitbucket-pipelines and ACR.

I need examples of how to write the bitbucket-pipelines.yml

using 'az acr build' and how to push the image into ACR.


Please advise.

/Bo Christensen

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 20, 2023

Hi Bo,

Just to give you some context, Pipelines builds run in Docker containers. For every step of your build, a Docker container starts using the image you have specified in your bitbucket-pipelines.yml file. The repo is cloned in that container, and then the commands of the step's script are executed. When the step finishes that Docker container gets destroyed.

If you want to execute commands like 'az acr build', the Azure CLI needs to be installed on the Docker image that is specified as a build container in your bitbucket-pipelines.yml file. Microsoft provides the Docker image that has Azure CLI pre-installed. You can use it by specifying it in your bitbucket-pipelines.yml file as follows:


This is the documentation for the Docker image options in bitbucket-pipelines.yml

If you use a different Docker image as a build container, you will need to install Azure CLI in the container by adding the necessary commands in the script of your step. So, it may be easier to use instead.

You should then be able to use commands from Azure CLI in the script of your step. For the exact commands that you need to use, you will need to check Azure CLI documentation:

If you have any questions, please feel free to reach out.

Kind regards,

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events