docker run -d -p 5000:5000 --restart=always --name my-registry registry:2
curl -X GET localhost:5000/v2/_catalog
Run:
docker pull nginx:latest
then
docker image tag nginx:latest
localhost:5000/nginx:latest
and finally push it using
docker push localhost:5000/nginx:latest.
image docker pull httpd:latest
and then
docker image tag httpd:latest
localhost:5000/httpd:latest
and finally push it using
docker push localhost:5000/httpd:latest
docker image prune -a
This will remove all images without at least one container associated to them.
docker image ls
docker pull [server-addr/image-name]
docker pull localhost:5000/nginx
Use: docker stop my-registry and then docker rm my-registry