Docker Registry

Docker Registry #

Central repository of Docker images.

Naming #

Convention is to reference images using the following format: <user/account>:<image/repository>

User/account is what’s present on DockerHub.

Storage #

By default, images are stored on Dockerhub at docker.io, with a complete path to an image of: docker.io/<user/account>/<image/repository>

In any registry, particular images can be set as private.

Private Registry #

Private registries can also be set up as needed.

Private images require credentialing for access.

Deploy Private Registry #

Can also locally deploy private registry, using image registry, which defaults to port 5000.

dock run -d -p 5000:5000 --name registry

To push images to local private registry, first tag image with a local URL:

docker image tag <image name> localhost:5000/<image name>

Then push the image:

docker push localhost:5000/<image name>

Then the image can be pulled:

docker pull localhost:5000/<image name>

^ Altneratively, the localhost can be replaced with the host IP address.