What does docker url design matter?

https://registry.hub.docker.com/_/ubuntu/

In the URL before the product name is _.

What is this for?

+4
source share
1 answer

If you have an account on dockerhubcalled foobar:

# pull from your account (foobar)
docker pull foobar/ubuntu:latest

Otherwise, if you omit the username:

# pull from the official account (library)
docker pull ubuntu:latest
# almost the same as
docker pull library/ubuntu:latest

Underscore ( _) is a special namespace used to publish official repositories.

https://registry.hub.docker.com/_/ubuntu/ is almost the same as https://registry.hub.docker.com/u/library/ubuntu/


The only difference is that you will get different image names with the same image ID:

$ docker pull ubuntu:latest
$ docker pull library/ubuntu:latest
$ docker images

REPOSITORY                                TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
library/ubuntu                            latest              86ce37374f40        7 days ago          192.7 MB
ubuntu                                    latest              86ce37374f40        7 days ago          192.7 MB
+9
source

All Articles