Docker - Registry (Remote Image Store)
Table of Contents
About
A Docker Registry is a remote store of Docker images.
Technically, a registry is an instance of the registry image, and runs within Docker.
Docker store allows you to buy and sell Docker images or distribute them for free.
Articles Related
Type
public
- Docker Hub (default)
- Docker Cloud
private
- with Docker Datacenter (DDC), it includes Docker Trusted Registry (DTR).
Management
Default
Docker is configured to look for images on Docker Hub by default.
Start/Stop
- Start your registry
docker run -d -p 5000:5000 --name registry registry:2
- Stop the registry and remove all data
docker container stop registry && docker container rm -v registry
Push/Pull
When you use
- the docker pull or docker run commands, the required images are pulled from your configured registry.
- the docker push command, your image is pushed to your configured registry.
Example:
- Tag the image so that it points to your registry
docker image tag ubuntu localhost:5000/myfirstimage
- Push it
docker push localhost:5000/myfirstimage
- Pull it
docker pull localhost:5000/myfirstimage