c create a docker private repository
docker pull registry:2.1.1
mkdir /opt/registry
#mkdir /var/lib/registry
docker run -d -p 5000:5000 -v /opt/registry:/var/lib/registry --restart=always --name registry registry:2.1.1
curl http://node2:5000/v2/_catalog
- # sudo docker push 192.168.61.128:5000/busybox
- The push refers to a repository [192.168.61.128:5000/busybox]
- Get https://192.168.61.128:5000/v1/_ping: http: server gave HTTP response to HTTPS client
The above prompt appears, indicating that the local warehouse uses https by default for uploading. If it is not https, the above prompt will appear.
For the solution, you can refer to the method
Modify the file /usr/lib/systemd/system/docker.service, add --insecure-registry node2:5000 after ExecStart=/usr/bin/dockerd, and restart the docker service
Reference https://blog.csdn.net/bxzhu/article/details/73253032