docker pull registry docker run -d -p 5000:5000 -v /home/registry/:/temp/registry --name myregistry --privileged=true registry
curl -XGET http://192.168.32.100:5000/v2/_catalog #返回 {"repositories":[]}
修改 /etc/docker/daemon.json
文件。
{ "registry-mirrors": ["https://cawn2yly.mirror.aliyuncs.com"], "insecure-registries":["192.168.32.100:5000"] }
修改后重启docker
sudo systemctl daemon-reload sudo systemctl restart docker
docker tag 860b610b6aaa 192.168.32.100:5000/ubuntunettools:1.0.0
docker push 192.168.32.100:5000/ubuntunettools:1.0.0
成功后,可再次验证私服,看看repositories参数是否有变化。
docker pull 192.168.32.100:5000/ubuntunettools:1.0.0