gpt4 book ai didi

docker - DOCKER_TLS_VERIFY 和 DOCKER_CERT_PATH 变量有什么作用?

转载 作者:IT老高 更新时间:2023-10-28 21:19:15 29 4
gpt4 key购买 nike

我是 Docker 新手,在 Windows 7 上使用 boot2docker。
当我尝试通过 spotify maven 插件配置 Docker 构建时,我被要求设置以下 env 变量:

DOCKER_HOST
DOCKER_CERT_PATH
DOCKER_TLS_VERIFY

配置成功但不确定DOCKER_TLS_VERIFYDOCKER_CERT_PATH 变量有什么作用?

最佳答案

作为 mentioned in the README :

By default, boot2docker runs docker with TLS enabled. It auto-generates certificates and stores them in /home/docker/.docker inside the VM.
The boot2docker up command will copy them to ~/.boot2docker/certs on the host machine once the VM has started, and output the correct values for the DOCKER_CERT_PATH and DOCKER_TLS_VERIFY environment variables.

eval "$(boot2docker shellinit)" will also set them correctly.

We strongly recommend against running Boot2Docker with an unencrypted Docker socket for security reasons, but if you have tools that cannot be easily switched, you can disable it by adding DOCKER_TLS=no to your /var/lib/boot2docker/profile file.

在更动态的环境中,boot2docker ip 可以更改,请参阅 issue 944 .

关于docker - DOCKER_TLS_VERIFY 和 DOCKER_CERT_PATH 变量有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31176262/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com