有没有什么可以配置的--允许不安全-ssl用于使用 docker-machine 创建的 docker 守护进程。
命令:
docker-machine create --driver virtualbox dev
eval "$(docker-machine env dev)"
docker run myregistry:5000/busybox:latest echo 'hello world'
output:
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 stable 版本,则无法以简单的方式设置 docker 选项。但在下一个版本 v0.3 中,这个问题通过创建参数得到了解决。
目前这个功能在RC1上,那么你可以使用一个版本v0.3.0-RC-1 https://github.com/docker/machine/releases/tag/v0.3.0-rc1或者等待下一个稳定版本v0.3.0(暂定6月16日)交付。
然后使用参数--engine-insecure-registry
to set --allow-insecure-ssl
对于docker的守护进程,例如:
docker-machine create --driver virtualbox --engine-insecure-registry myregistry:5000 dev
之后您可以执行:
docker run myregistry:5000/busybox:latest echo 'hello world'
此外,您还可以阅读有关它的内容项目文件 https://github.com/docker/machine/blob/master/docs/index.md.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)