具有--insecure-registry和docker 1.5的docker注册表 [英] docker registry with --insecure-registry and docker 1.5

查看:70
本文介绍了具有--insecure-registry和docker 1.5的docker注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在docker 1.5上遇到问题.

I have an issue with docker 1.5.

因此,我在myregistry:5000上运行了一个私有注册表.我可以推&使用以下命令从其他位置(debian 7和docker 1.4)中拉出:

So, I run a private registry at myregistry:5000. I can push & pull from an other location (debian 7 & docker 1.4) with :

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

在/etc/default/docker

in /etc/default/docker

现在,我有一个带有docker 1.5和debian 8的新系统,它不再起作用.我尝试了所有可能性,例如-insecure-registry = myregistry:5000 -insecure-registry http://myregistry:5000

Now, I have a new system with docker 1.5 and debian 8, it's not working anymore. I tried all possibilities like, --insecure-registry=myregistry:5000 or --insecure-registry http://myregistry:5000

有任何线索吗?

(注意:如果我停止docker并启动 docker -d --insecure-registry myregistry:5000 ,效果很好)

(Note : It works well if I stop docker and launch docker -d --insecure-registry myregistry:5000 )

推荐答案

如果它可以帮助任何人,我认为问题不是来自Docker(我尝试更新注册表失败,但没有成功),而是来自 systemd start命令.

If it can help anyone, I think the problem not coming from Docker, (I tried to update my registry with no success) but from systemd start command.

因此,这不是一个干净的解决方案,但它仍然比在屏幕上启动docker更干净.

So, it's not a clean solution, but it still cleaner than launching docker in a screen.

我修改/lib/systemd/system/docker.service 并更改 ExecStart 行:

ExecStart=/usr/bin/docker --insecure-registry myregistry:5000 -d -H fd://

然后, systemctl守护程序重新加载systemctl重新启动docker

就是这样.有用.我可以拉&推送到我的远程私人注册表.

And that's it. It works. I can pull & push to my distant private registry.

这篇关于具有--insecure-registry和docker 1.5的docker注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆