zoukankan      html  css  js  c++  java
  • docker registry的https错误解决

    从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  
  • 相关阅读:
    ES6 常用总结(前端开发js技术进阶提升总结)
    web前端之es6对象的扩展
    ES6数组及对象遍历的新增方法 entries(),keys() 和 values()
    关于日期
    最近遇到的几个小东西
    求模
    同步 异步请求的认识
    变量名和函数名声明提升
    机顶盒前端开发小结
    js节点使用 碎片节点
  • 原文地址:https://www.cnblogs.com/hutuchong/p/7749666.html
Copyright © 2011-2022 走看看