Home  >  Q&A  >  body text

docker镜像push报错

服务器上的registry已经启动了

看了下文档要使用Insecure Registry要添加DOCKER_OPTS="--insecure-registry myregistrydomain.com:5000"
但没有找到/etc/sysconfig/docker这文件,所以就在docker.service里添加了如下(centos7好像没/etc/sysconfig/docker这文件了)

ExecStart=/usr/bin/docker daemon --registry-mirror=https://187wuopo.mirror.aliyuncs.com --insecure-registry 121.42.217.35:5000 -H fd://

sudo docker push 121.42.217.35:5000/php:7

报错:
Get https://121.42.217.35:5000/v1/_ping: tls: oversized record received with length 20527

感觉是DOCKER_OPTS放错地方了...

ringa_leeringa_lee2758 days ago748

reply all(2)I'll reply

  • 習慣沉默

    習慣沉默2017-04-24 16:02:03

    may be /etc/default/docker这个地址?修改/添加DOCKER_OPTS as follows:

    DOCKER_OPTS="--insecure-registry 121.42.217.35:5000"

    reply
    0
  • 漂亮男人

    漂亮男人2017-04-24 16:02:03

    docker issue 14513: http://www.artificialworlds.n...

    解法:

    # create docker override config: "/etc/systemd/system/docker.service.d/override.conf"
    # add the settings below
    [Service] 
    ExecStart= 
    ExecStart=/usr/bin/docker daemon -H fd:// --insecure-registry=192.168.1.201:5000
    # restart docker service
    systemctl stop docker
    systemctl start docker
    # start to pull images from private docker registry
    docker pull 192.168.1.201:5000/puya_mbk_centos67

    reply
    0
  • Cancelreply