Home Linux Containers
Public Registry
https://hub.docker.com/

Setting up a private registry / Docker Trusted Registry
https://docs.docker.com/ee/dtr/

Login to the registry

docker login


Tag ( associate a local image with the registy ) 

docker tag IMAGE USERNAME/REPOSITORY:TAG


Publish the image

docker push SERVER/USERNAME/REPOSITORY:TAG


Pull and run the image from the remote repository

docker run -d SERVER/USERNAME:REPOSITORY:TAG


Running a local registry for testing ( not authenticated no TLS )

docker run -d -p 127.0.0.1:5000:5000 --restart=always --name myregistry -v /PATH/TO/DATA:/var/lib/registry registry:2

Without a certificate the registry works only on 127.0.0.1 
to use the registry from other hosts use an ssh tunnel pointing to 127.0.0.1:5000

Without a certificate, tag and push only works on 127.0.0.1

docker tag  myapp:1.0 127.0.0.1:5000/myapp:1.0
docker push 127.0.0.1:5000/myapp:1.0


View content of the registry

curl http://HOSTNAME:5000/v2/_catalog
curl http://127.0.0.1:5000/v2/MYAPP/tags/list