Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pushing docker images to self hosted r

Martí Bastida Comas January 20, 2022

Hi, I have spun up a docker registry on docker.domain.com.

 

From any machine I can login to the registry via:

docker login -u username -p password docker.domain.com

 And from the browser if I browse to https://docker.domain.com/v2 I get the typical Basic Auth pop up to enter credentials. After logging in I get the typicial blank {} response.

Now, I have a pipeline (the docker template from bitbucket) that contains (I know this is not safe, I was just trying to get to the error):

- docker login -u username -p password docker.domain.com

Which is the same line as before. But this time when I run the pipeline I get:

Error response from daemon: Get https://docker.domain.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)  

2 answers

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 24, 2022

Hi, @Martí Bastida Comas, thank you for reaching out to Atlassian Community.

As you confirmed it works locally and by the error message you received, what could be happening is that your private docker registry could be behind a firewall and not allowing the pipeline to connect. If that’s the case, you would need to ensure that these IPs are whitelisted:

Please let me know how it goes and feel free to share any additional questions or concerns regarding this case. 

Kind regards,
Caroline 

Martí Bastida Comas January 24, 2022

Thanks @Caroline R

I will give it a try and come back.

 

But I doubt it's the problem. The registry is hosted in a VPS and I have not configured a firewall. But I will check with the VPS provider just in case.

0 votes
Pramodh M
Community Champion
January 21, 2022

Hi @Martí Bastida Comas 

If you are using custom docker registry, try with v1 as described here

https://docs.docker.com/engine/reference/commandline/login/

If you have solved the issue, feel free to post it here

Thanks,

Pramodh

Martí Bastida Comas January 22, 2022

Hi @Pramodh M and thanks for the reply.

 

From what I have read on the post you are suggesting that I need to install a credential store helper on the pipeline? 

 

Because the documentation mentions a /v1 path. But it is part of the example on how to configure a credential store.

Martí Bastida Comas January 23, 2022

Excuse me @Pramodh M for my insisting but I don't really understand how the link you sent me can help with the problem I'm struggling.

 

The links seems to work around the idea of using an external Credential Store to increase security. How can this help me?

Moreover, from any machine other than the bitbucket pipelines the docker login command works...

 

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events