参考官网:https://docs.docker.com/registry/#alternatives
1.创建本地localhost 仓库
开启仓库
会自动pull registry 镜像,开启容器。
docker run -d -p 5000:5000 --name registry registry:2
创建自己镜像,或随便pull一个,用来测试
docker pull centos
tag这个镜像目的是让其指向你的仓库
docker tag centos localhost:5000/myfirstimage
上传到仓库
docker push localhost:5000/myfirstimage
拉取镜像