docker镜像push报错
ringa_lee
ringa_lee 2017-04-24 16:00:03
0
2
783

服务器上的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_lee
ringa_lee

ringa_lee

reply all(2)
習慣沉默

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

DOCKER_OPTS="--insecure-registry 121.42.217.35:5000"
漂亮男人

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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template