假設在192.168.100.17
服務器上搭建私服git
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/distributiongithub
push以前須要在/etc/docker/daemon.json
添加一行docker
{"insecure-registries": ["192.168.100.17:5000"]}
重啓dockerjson
restart docker
打標籤服務器
docker tag busybox 192.168.100.17:5000/busybox
開始pushrest
docker push 192.168.100.17:5000/busybox
pull的話同理code
docker pull 192.168.100.17:5000/busybox