Docker/Harbor issues

  • The docker registry uses the http protocol, and the client prompts "server gave HTTP response to HTTPS client"
# 在客户端 /etc/docker/daemon.json 中增加 insecure-registries 配置
#     "insecure-registries":["10.0.2.22:5080"]
# 重启客户端的 docker 服务
systemctl restart docker
  • The docker registry uses the https protocol, and the client prompts "authority unknown ..."
# 在客户端 /etc/docker/ 下创建 registry server 的 domain/ip 目录
mkdir /etc/docker/certs.d/10.0.2.22:5080/ -p
# 复制 registry server 的 ca.crt (该文件由 openssl 创建密钥时生成)
scp [email protected]:/opt/harbor/keys/ca.crt /etc/docker/certs.d/10.0.2.22:5080/
# 重启客户端的 docker 服务
systemctl restart docker

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325302225&siteId=291194637
Recommended