Is the interpretation of the command below correct?
My Interpretation: create a registry called "registry" that listens on port 5002 of the container, which maps to host port 5001.
In addition, I do not understand what "registry: 2" is for? It looks like a "repository_name: tag", which is equivalent to the image name. Is it correct?
docker run -d -p 5001:5002 --restart=always --name registry registry:2
In addition, I tried using "registry: 1" and "registry: 3", which did not work. It only works when I use "registry: 2".
✘ ~ docker run -d -p 5001:5002 --restart=always --name new_registry registry:3
Unable to find image 'registry:3' locally
Pulling repository docker.io/library/registry
Tag 3 not found in repository docker.io/library/registry
✘ ~ docker run -d -p 5001:5002 --restart=always --name new_registry registry:1
Unable to find image 'registry:1' locally
Pulling repository docker.io/library/registry
Tag 1 not found in repository docker.io/library/registry
source
share