有啥办法能让 docker-machine env 命令走代理?

2020-10-10 15:04:56 +08:00
 everyx

网站用的 docker swarm,我的工作流:更新的时候,直接 eval $(docker-machine env xx) 然后直接 docker stack deploy 部署,服务器在国外,但是这两天 docker-machine env 经常 time out

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "xxx.xxx.xxx.xxx:2376": tls: DialWithDialer timed out
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.

查了资料,没找到设置的方法,已经设置了 http_proxy https_proxy 环境变量,大家又碰到这个问题么?不知道有什么解决方法。

786 次点击
所在节点    问与答
1 条回复
everyx
2020-10-10 15:20:19 +08:00
难道只能手拼命令了 😂

set -gx DOCKER_TLS_VERIFY "1";
set -gx DOCKER_HOST "tcp://xxx.xxx.xxx.xx:2376";
set -gx DOCKER_CERT_PATH "/home/xxxxxx/.docker/machine/machines/xxxx";
set -gx DOCKER_MACHINE_NAME "xxxx";

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/713660

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX