1、安裝registry鏡像docker
docker pull registryjson
2、啓動容器centos
dcoker run -d -p 5000:5000 -v /root/docker/registry:/tmp/registry registryspa
3、修改鏡像命名rest
docker tag 735f80812f90 192.168.182.155:5000/centoscode
4、推送鏡像至私有倉庫blog
docker push 192.168.182.155:5000/centosclass
若是報錯以下錯誤容器
進入/etc/docker下,建立daemon.json文件,寫入:service
{ "insecure-registries":["192.168.182.155:5000"]}
重啓
systemctl restart docker.service