当前位置: 代码迷 >> GIS >> 本地docker registry的https异常解决
  详细解决方案

本地docker registry的https异常解决

热度:430   发布时间:2016-05-05 06:09:24.0
本地docker registry的https错误解决

从docker1.3.2版本开始默认docker registry使用的是https,当你用docker pull 非https的docker regsitry的时候会报下面错误:

Error: Invalid registry endpoint ... Get ... If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add '--insecure-registry 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 certificate at /etc/docker/certs.d/192.168.1.103:5000/ca.crt

?

解决方案:

vi /usr/lib/systemd/system/docker.service

?

内容修改如下:

[Unit]Description=Docker Application Container EngineDocumentation=http://docs.docker.comAfter=network.target docker.socketRequires=docker.socket[Service]Type=notifyEnvironmentFile=-/etc/sysconfig/dockerEnvironmentFile=-/etc/sysconfig/docker-storageExecStart=/usr/bin/docker -d --insecure-registry 192.168.1.103:5000  -H fd:// $OPTIONS $DOCKER_STORAGE_OPTIONSLimitNOFILE=1048576LimitNPROC=1048576[Install]WantedBy=multi-user.target

?

  相关解决方案