1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| docker pull docker.io/registry docker save -o registry.tar registry
docker load -i registry.tar
docker run \ -d \ -p 5000:5000 \ -v /var/lib/registry:/var/lib/registry \ --restart=always \ --name docker-registry \ registry
vi /etc/docker/daemon.json { "insecure-registries":["10.10.51.77:5000","registry.yourcompany.com:5000"] }
systemctl daemon-reload & systemctl restart docker
docker pull nginx docker tag nginx 10.10.51.77:5000/nginx docker push 10.10.51.77:5000/nginx
|