docker registry的https错误解决
Posted 杭州糊涂虫
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 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
以上是关于docker registry的https错误解决的主要内容,如果未能解决你的问题,请参考以下文章
docker registry push错误“server gave HTTP response to HTTPS client”
Docker pull拉取镜像报错“Error response from daemon: Get “https://registry-1.docker.io/v2”解决办法
Docker问题解决:Error response from daemon: Get https://registry-1.docker.io/v2/yandex/clickhouse-server/
centos7 docker registry push错误“server gave HTTP response to HTTPS client”
docker拉取镜像时报错:docker: Error response from daemon: Get “https://registry-1.docker.io/v2/“: dial tcp: