I'm using bitbucket pipelines and try to configure a step to authenticate to my private registry deployed with a self-signed certificate.
but the following command returns : "x509: certificate signed by unknown authority"
docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD registry.my-company.com
On a linux-based normal build environnement, I normally use the method described there to specify my certificate authority : Docker registry - use self signed certificates which is :
cp certs/domain.crt /usr/local/share/ca-certificates/myregistrydomain.com.crt update-ca-certificates
But with bitbucket pipelines I did not find the way to interact with docker daemon to tell him to use my certificate authority as it is started in a separate instance.
How to tell docker daemon to trust my certificate ?
Here is my basic bitbucket-pipelines configuration file :
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD registry.my-company.com
Thank you for your kind help :)
Pipelines provides no mechanism for restarting the Docker daemon. You're going to need to figure out a workaround that doesn't need to do this. Which the Docker documentation suggests there aren't any.
I'd suggest opening a ticket here to track being able to interact with the Docker daemon: https://bitbucket.org/site/master/issues/new
Unfortunately I can't think of any more specific guidance here.
Thank you for taking the time to answer!
You confirmed my thought about the docker daemon.
Knowing that, as a workaround I am thinking to redeploy a docker repository proxy with a Lets-encrypt certificate following this kind of procedure.
Like that I just need to change my repository proxy, not the repository itself that stay private.
I will let you know if it works.
I am also getting same error "x509: certificate signed by unknown authority" when I am trying to connect my harbor registry from bitbucket pile line script.
Please let me know is there any way to resolve this issue ?
- docker login --username $HARBOR_USERNAME --password $HARBOR_PASSWORD registry.my-company.com
Hi everyone, We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...
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