Connecting to private docker registry from a docker container

91 Views Asked by At

I have a docker container through which I need to connect to a private docker registry. I added the certificate in the /etc/docker/certs.d/myhostname.com folder, but whenever I try to login using docker login -u username myhostname.com, I get the following error message: x509: certificate signed by unknown authority. I did the same steps from outside the docker container, i.e. the host machine and it works fine. Any suggestions?

Further context: The docker container is running a jenkins pipeline which needs to publish to my private Harbor registry.

0

There are 0 best solutions below