拉取registry
docker pull registry:2
启动本地registry
mkdir -p /data/docker/registry
docker run -d -p 5000:5000 --restart always --name registry -v /data/docker/registry:/var/lib/registry registry:2
显示容器信息
docker inspect registry
测试提交
docker pull ubuntu
docker tag ubuntu localhost:5000/ubuntu
docker push localhost:5000/ubuntu
WEB访问
删除本地镜像从私有仓库拉取
docker rmi docker.io/ubuntu
docker rmi localhost:5000/ubuntu
docker pull localhost:5000/ubuntu
参考文档
关于Docker Registry v2的搭建
http://blog.csdn.net/felix_yujing/article/details/51564739