從docker1.3.2版本開始默認docker registry使用的是https,當你用docker pull 非https的docker regsitry的時候會報下面錯誤:docker
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.14.1:5001/ca.crt
若是使用的是MacOS版的Docker GUI工具,能夠進「Preference」裏面「Advanced」在「Insecure Registry」里加上192.168.14.1:5001
,再重啓就能夠了。socket
若是使用的是Ubuntu15.04之後的版本,修改Docker的服務啓動文件便可。工具
解決方案:ui
vi /lib/systemd/system/docker.service
內容修改以下:this
[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 --insecure-registry 192.168.14.1:5001 -H fd:// $OPTIONS $DOCKER_STORAGE_OPTIONS LimitNOFILE=1048576 LimitNPROC=1048576 [Install] WantedBy=multi-user.target
若是使用的是Ubuntu14.04之後的版本,參考這裏:http://www.javashuo.com/article/p-khquqrqg-hq.html 。.net