允许在配备docker-machine的主机中使用不安全的注册表 [英] allow insecure registry in host provisioned with docker-machine
问题描述
无论如何,是否需要为使用docker-machine创建的docker守护进程配置-allow-insecure-ssl 。
Is there anyway to configure --allow-insecure-ssl for docker's deamon created with docker-machine.
命令:
docker-machine create --driver virtualbox dev
eval "$(docker-machine env dev)"
docker run myregistry:5000/busybox:latest echo 'hello world'
输出:
Unable to find image 'myregistry:5000/busybox:latest' locally
2015/06/04 16:54:17 Error: v1 ping attempt failed with error: Get
https://myregistry:5000/v1/_ping: EOF. If this private
registry supports only HTTP or HTTPS with an unknown CA certificate,
please add `--insecure-registry myregistry: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/myregistry:5000/ca.crt
推荐答案
如果您正在运行docker-machine v0.2稳定版,则无法以简便的方式设置docker选项。但是在下一个版本v0.3中,此问题已通过创建参数解决。
If you are running docker-machine version v0.2 stable, you can't set docker option in light way. But in next version v0.3 this problem was resolved with the creation parameters.
目前,此功能位于RC1上,然后您可以使用版本v0.3.0-RC-1 或等待下一个稳定版本v0.3.0(暂定为Jun。 16)。
At this moment this feature it's on RC1,then you can use a version v0.3.0-RC-1 or wait for delivery the next stable version v0.3.0(tentatively Jun.16).
然后使用参数-engine-insecure-registry
设置-allow- docker守护进程的insecure-ssl
,例如:
Then use parameter --engine-insecure-registry
to set --allow-insecure-ssl
for docker's daemon, for example:
docker-machine create --driver virtualbox --engine-insecure-registry myregistry:5000 dev
之后,您可以执行:
docker run myregistry:5000/busybox:latest echo 'hello world'
此外,您还可以在项目文档。
这篇关于允许在配备docker-machine的主机中使用不安全的注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!