docker private repository

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

 

  1. # sudo docker push 192.168.61.128:5000/busybox  
  2. The push refers to a repository [192.168.61.128:5000/busybox]  
  3. 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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324573070&siteId=291194637