Do docker registry names matter?
When you want to push an image to a docker registry, you need to tag it with the registry name. Does the name matter?
$ docker tag hello-world registry.example.com/hello-world
But if your registry is resolvable by different names (maybe it’s also available as
docker.example.com), does this
Having just understood NodePort services, I’ve got plenty of names I can use to refer to my private docker repository. So let’s find out.
% docker pull hello-world
% docker tag hello-world rpi401:30721/hello-world
% docker push rpi401:30721/hello-world
If I pull it from a different name, does that matter?
% docker pull rpi402:30721/hello-world
Using default tag: latest
latest: Pulling from hello-world
Status: Downloaded newer image for rpi402:30721/hello-world:latest
Apparently not, no. We end up with it listed multiple times locally:
% docker image ls | grep hello-world
hello-world latest feb5d9fea6a5 2 months ago 13.3kB
rpi401:30721/hello-world latest feb5d9fea6a5 2 months ago 13.3kB
rpi402:30721/hello-world latest feb5d9fea6a5 2 months ago 13.3kB
But they all have the same image ID, so I guess it doesn’t particularly matter.