I have read many lessons on how to configure and use my own private docker registry.
One thing that alerted me was the fact that the tag by which I put the image looks closely related to the registry host name.
docker tag <imageid> registry.mycompany.com:5000/myrepo:tag docker push registry.mycompany.com:5000/myrepo:tag
It seems really controversial. What happens if the registry needs to switch to a different host name? Or if I use different host names, regardless of whether I use the server inside / outside?
What seems more intuitive to me is to specify the registry when pressed / pulled:
docker tag <imageid> myrepo:tag docker push myrepo:tag --registry=registry.mycompany.com docker pull myrepo:tag --registry=registry.mycompnay.com
What is the reason for this? What key bit of information do I miss?
source share