分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > IT知识

docker registry的https错误解决

发布时间:2023-09-06 01:21责任编辑:沈小雨关键词:http

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

Java代码  
  1. 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  

解决方案:

Java代码  
  1. vi /usr/lib/systemd/system/docker.service  

内容修改如下:

Java代码  
  1. [Unit]  
  2. Description=Docker Application Container Engine  
  3. Documentation=http://docs.docker.com  
  4. After=network.target docker.socket  
  5. Requires=docker.socket  
  6.   
  7. [Service]  
  8. Type=notify  
  9. EnvironmentFile=-/etc/sysconfig/docker  
  10. EnvironmentFile=-/etc/sysconfig/docker-storage  
  11. ExecStart=/usr/bin/docker -d --insecure-registry 192.168.1.103:5000  -H fd:// $OPTIONS $DOCKER_STORAGE_OPTIONS  
  12. LimitNOFILE=1048576  
  13. LimitNPROC=1048576  
  14.   
  15. [Install]  
  16. WantedBy=multi-user.target  

docker registry的https错误解决

原文地址:http://www.cnblogs.com/hutuchong/p/7749666.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved