zoukankan      html  css  js  c++  java
  • Docker私服仓库push 错误

    docker push 提交时错误提示;

    docker push 192.168.1.110:5000/redis
    
    Error response from daemon: invalid registry endpoint https://192.168.1.110:5000/v0/: unable to ping registry endpoint https://192.168.1.110:5000/v0/ v2 ping attempt failed with error: Get https://192.168.1.110:5000/v2/: EOF v1 ping attempt failed with error: Get https://192.168.1.110:5000/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 192.168.1.110: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.110:5000/ca.crt
    

      

    提示的说明要加--insecure-registry 参数, 此参数是要在docker 服务启动时添加, 可通过以下命令查看是否使用此参数;

    ps aux| grep docker  
    

    在google 上找到很多种加此参数的方式都不成功,可能版本不对吧;

    centos6.5, docker 1.7.1;

    vi /etc/sysconfig/docker 
    #修改
    other_args="--insecure-registry 192.168.1.110:5000"
    #重启服务
    service docker restart
    

    centos7.2,docker 1.9.1;

    vi /usr/lib/systemd/system/docker.service
    #修改
    ExecStart=/usr/bin/docker daemon -H fd:// --insecure-registry 192.168.1.110:5000
    #重启服务
    systemctl restart docker.service
    

      

    centos7.2,docker 1.12.3;

    1 vi /etc/docker/daemon.json
    2 #修改或新增
    3 {"insecure-registries":["192.168.1.110:5000"]}
    4 #重启服务
    5 systemctl restart docker.service
  • 相关阅读:
    1343. Fairy Tale
    Codeforces Beta Round #97 (Div. 1)
    URAL1091. Tmutarakan Exams(容斥)
    1141. RSA Attack(RSA)
    hdu4003Find Metal Mineral(树形DP)
    hdu2196 Computer待续
    KMP
    莫比乌斯反演
    配对堆
    bzoj3224Treap
  • 原文地址:https://www.cnblogs.com/xdsfoo/p/5015426.html
Copyright © 2011-2022 走看看