If you have an account on dockerhubcalled foobar:
docker pull foobar/ubuntu:latest
Otherwise, if you omit the username:
docker pull ubuntu:latest
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
source
share