Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

how to configure docker runner to authorize with private docker registry Edited

how can i configure Job -> Docker to authorize with my private docker registry?

i'm getting 403 when downloading private docker image e.g. private/docker-image:1.2.3

 

image.png

1 answer

1 accepted

1 vote
Answer accepted
Robert W Atlassian Team Mar 05, 2018

Hi Piotr,

 

 

If the private image is in a registry which does not require authentication you can just use the registry url in the Docker image field.

 

If your registry requires authentication, it becomes a little more complicated.

You will need to set up a script on the agent server which will run the docker login command. (in ~/.profile for example)

 

docker login -u <myuser> -p <mypassword> registryurl

 

Once this is configured and the remote agent has sourced the new script, it will be able to connect to the private image registry.  You can test this by attempting a docker pull for your desired image.

 

You will need to configure the above for all remote agents which will need to connect to the private registry.

Robert W Atlassian Team Mar 05, 2018

If you don't want passwords stored in plain text, you can use the credential helpers as outlined in the documentation for the docker login command.

Docker Login

Follow-up question. What if the repository is an AWS ECR, which the login is only good for a certain period of time and then you have to login again? Any suggestions on how to handle that?

Robert W Atlassian Team Sep 07, 2018

If your credentials remain the same, you can re-run the docker login command to re-authorize your agent.  (you should be able to automate this with a chron job).

 

If your credentials have expired/rotated, you'll need to modify your script to use the new credentials.

Thanks :)

I meant to reply to this and forgot to yesterday. I found this solution from AWS Labs that pretty much solves the problem for me for ECR repositories:

https://github.com/awslabs/amazon-ecr-credential-helper

Like Steffen Opel _Utoolity_ likes this

I know this thread is a bit old but can you elaborate how this would look on a CentOS7 system?  Is there a particular name needed for the the login script?  Where does it need to be stored?  How does Bamboo find the script?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

190 views 4 6
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