Docker Desktop provides an integrated container-native development experience; it launches as an application from your Mac or Windows toolbar and provides access to the largest library of community and certified Linux and Windows Server content from Docker Hub. For example, assuming we are mirroring the Docker Hub, an operator might be fine with having the library/mariadb image but not the library/redis one. When operating a registry configured as pull-through cache, all the images of the upstream registry are at the reach of all the users of the cluster.
I try and try to create mirror in docker-registry. I have read the tutorial in. And use the way in. I'm sure I have add variable to docker daemon. And I succeed on mac OS X.
But it didn't work at all on my centOS. I run my docker daemon using this command: docker -g /opt/apps/docker/lib -insecure-registry -registry-mirror=-d and I use this command to check docker daemon: ps -ef grep 'docker' It really has added to docker: root 1232 30203 0 20:47? 00:00:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 10022 -container-ip 172.17.0.22 -container-port 22 root 1322 735 0 20:57 pts/7 00:00:00 grep -color=auto docker root 30202 1 0 20:15? 00:00:00 sudo httpproxy=docker -g /opt/apps/docker/lib -insecure-registry -registry-mirror=-d Then, I use this command to create mirror: docker run -d -p 5555:5000 -e STORAGEPATH=/mirror -e STANDALONE=false -e MIRRORSOURCE=-e MIRRORSOURCEINDEX=-v /Users/v11/Documents/docker-mirror:/mirror -restart=always -name mirror registry Next,I pull the new image, for example: docker pull ubuntu It did't work at all, because I can't find image in my path '/Users/v11/Documents/docker-mirror'.
I print the mirror log information and it will show me error information: ConnectionError: HTTPSConnectionPool(host='index.docker.io', port=443): Max retries exceeded with url: /v1/repositories/library/hello-world/images (Caused by: Errno 110 Connection timed out) and docker log: INFO0023 POST /v1.19/images/create?fromImage=hello-world%3Alatest ERRO0027 Unable to create endpoint for: invalid registry endpoint: unable to ping registry endpoint v2 ping attempt failed with error: Get: EOF v1 ping attempt failed with error: Get: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add -insecure-registry 10.11.1 to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/10.11.1/ca.crt I really search many relevant questions to find solving. But I still have no idea about it.
How to do it?