在109.105.46.94 上搭建私有仓库,109.105.46.95上访问私仓库
109.105.46.94上执行以下步骤:
- docker pull registry
- docker run -d -p 5000:5000 -v /home/nwlab/registry/:/var/lib/registry/--restart=always --name registry registry
109.105.46.95上执行以下步骤:
- 在/etc/default/docker中添加DOCKER_OPTS=" --insecure-registry=109.105.46.94:5000 "
- systemctl daemon-reload
- systemctl restart docker
- docker push 109.105.46.94:5000/docker-example/web