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

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

Antworte allen(2)
習慣沉默

可能是/etc/default/docker这个地址?修改/添加DOCKER_OPTS如下:

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
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage