拉registry镜像
假设在192.168.100.17
服务器上搭建私服
docker pull registry
docker run -d -v /data/docker/registry:/var/lib/registry -p 5000:5000 --restart=always registry
registry的github地址:https://github.com/docker/distribution
配置docker
push之前需要在/etc/docker/daemon.json
添加一行
{"insecure-registries": ["192.168.100.17:5000"]}
重启docker
restart docker
push
打标签
docker tag busybox 192.168.100.17:5000/busybox
开始push
docker push 192.168.100.17:5000/busybox
pull的话同理
docker pull 192.168.100.17:5000/busybox