Reputation: 3019
I am new to docker and just going through the online links to understand how it works. However I am not getting much clarity on Docker Registry and Docker Index. I get that part that your docker image will be there on registry and client uses pull command to daemon which in turn get the image from registry. But I also read that you can get and image from Index as well then what is the difference between these two?
Thank you.
Upvotes: 4
Views: 1276
Reputation: 18983
I'm not sure about Docker Registry. But a docker registry is a service that stores images, allowing you to pull and push them. distribution
/registry
is probably the most popular implementation. Docker Index is the former name of Docker Hub. There's also an index server, which is seemingly what's left from the registry v1 api if you extract the registry v2 api from it. Namely, searching for images. And apparently Docker Hub has both a docker registry and an index server.
More on it here.
Upvotes: 0
Reputation: 17487
I think Where are Docker images stored? gives a good explanation:
An index manages user accounts, permissions, search, tagging, and all that nice stuff that's in the public web interface.
A registry stores and serves up the actual image assets, and it delegates authentication to the index.
When you run docker search, it's searching the index, not the registry. In fact, it might be searching multiple registries that the index is aware of.
When you run docker push or docker pull, the index determines if you are allowed to access or modify the image, but the registry is the piece that stores it or sends it down the wire to you after the index approves the operation. Also, the index figures out which registry that particular image lives in and forwards the request appropriately.
Beyond that, when you're working locally and running commands like docker images, you're interacting with something that is neither an index or a registry, but a little of both.
Upvotes: 3
Reputation: 5208
There is a slight difference, mostly because there were 2 API's developed, which were originally developed to be served by separate services.
https://github.com/docker/docker-registry implements the registry API, while the Docker Hub implements both.
I know of one open source implementation of the Index, which can be added to a docker-registry -
Upvotes: 1
Reputation: 9176
There is no difference. Both usually refers to Docker official image repository. You can also find it referred as Docker repository and Docker Hub. All of them usually refers to the same.
You also can find or set up an alternate repository and host there images, but then you would refer that repository as your repository or a particular name (e.g.: totum repository).
Upvotes: 0