Reputation: 1136
When we run the command docker image ls
, a list of images on the host machine are listed. Are these images stored on some kind of registry on the local machine.
If yes, what is the name of registry. Also, it is possible to create a registry on the host machine using some docker image for registry service in the form ip:5000. If this is created, will it be different from the first type of registry(docker image ls)
The question is mainly related to relation between registry and the images within it and not about the location on the file system
Upvotes: 0
Views: 241
Reputation: 31654
When you use docker image ls
, it will show all your images in local, including the one which you use docker build
& the one which you use docker pull
.
On linux for example, they are by default stored in /var/lib/docker/{driver-name}
, the driver-name
could be overlay2, overlay, aufs
, etc. But this called docker local images, not docker registry.
What is Docker registry
?
The Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. The Registry is open-source, under the permissive Apache license.
dockerhub is just one of the registry, if you do not want to use it, you of course could setup a private registry by yourself with next command:
docker run -d -p 5000:5000 --name registry registry:2
Then, you can push, pull from this registry, detail refers to official guide.
Upvotes: 2