Donna Barna
Nov 5 · 2 min read

Replying to your comment.. “The environment variable REGISTRY_HTTP_ADDR exposes the registry on 0.0.0.0:443 INSIDE the container. The option -p is mapping the port. In this case we have mapped the container port 443 on 443 on my host. Which means I can access the registry on MY-SERVER-IP:443. (In this case I was working on my localhost but if I was working on a server with IP 12.34.56.78 then I could have pushed the image on 12.34.56.78:443). If you only want to use localhost you can map the exposed container port to your localhost immediately: use -p 127.0.0.1:443:443 to map the registry container port only on your localhost on port 443. If you do this on server 12.34.56.78 then you can push to your registry when you’re ‘inside’ the server and connect to localhost:443 but you can not push from the outside on 12.34.56.78:443.” As a follow up to the above comment, I am looking to do something similar to what you mention here. I have gone through your tutorial and it works very well. However, I would like to log into a server outside of my host that is running my repository. I would like to do a => docker login -u user domain_name:443

Where domain_name is the name associated with IP 12.34.56.78 in your example.

But when I do this, I get the message -> x509: certificate signed by unknown authority

I also get this message when I try to connect to this domain_name:443 (docker login) from my host where I have my respository.

Can you point me to how I can get the dns name recognized on a different host — port 443?

Thank you!

    Donna Barna

    Written by