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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Pipeline to push Docker Images to Azure ACR

I am using the Bitbucket Pipelines instead of jenkins for ease purpose of development in our organization.

I need written a Dockerfile and placed it in the repo.

I also put a bitbucket pipeline for building the image and it was succeeded.

Now i need to push the created images to AZURE ACR instead of DockerHub, its asking for Dockerhub credentials for as default.

So how can i give my Azure ACR credentials to it.

Please help me in this regard.

Thankyou in advance.


2 answers

1 accepted

No problem! When you have resolved the problem, you could share a code snippet that works, for other people having the same problem.

Also, if any of the links above have helped, it would be good to mark the answer as "Accepted" so that others now where to look, thanks!

yes the links helped to solve the issue, i am sharing the snippet of code so it can be helpful for anyone looking for that.


image: atlassian/default-image:2

- step:
- docker
script: # Modify the commands below to build your repository.
# Set $DOCKER_HUB_USERNAME and $DOCKER_HUB_PASSWORD as environment variables in repository settings
- export IMAGE_NAME=<your ACR SERVER>/<DOCKER IMAGE>-api:latest

# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t $IMAGE_NAME .
# authenticate with the Docker Hub registry
- docker login  <your ACR server> --username <your ACR USERNAME> --password <your ACR PASSWORD>
# push the new Docker image to the Docker registry
- docker push $IMAGE_NAME

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

489 views 16 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you