Starting with the docker1.3.2 version, the default Docker registry uses HTTPS, and when you use Docker pull non-HTTPS Docker regsitry, the following error is reported:
Java code
- Error:invalid Registry Endpoint ... Get ... If This private registry supports only HTTP or HTTPS with a unknown CA certificate, please add '--insecure-re Gistry 192.168.1.103:5000 ' 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 C Ertificate at/etc/docker/certs.d/192.168. 1.103:5000/ca.crt
Solution:
Java code
- Vi/usr/lib/systemd/system/docker.service
The content is modified as follows:
Java code
- [Unit]
- Description=docker Application Container Engine
- Documentation=http://docs.docker.com
- After=network.target Docker.socket
- Requires=docker.socket
- [Service]
- Type=notify
- Environmentfile=-/etc/sysconfig/docker
- Environmentfile=-/etc/sysconfig/docker-storage
- execstart=/usr/bin/docker-d--insecure-registry 192.168. 1.103:5000-h FD://$OPTIONS $DOCKER _storage_options
- limitnofile=1048576
- limitnproc=1048576
- [Install]
- Wantedby=multi-user.target
HTTPS error resolution for Docker registry