What does the DOCKER_TLS_VERIFY and DOCKER_CERT_PATH variable do?

前端 未结 2 963
遇见更好的自我
遇见更好的自我 2021-02-05 23:48

I am new to Docker, using boot2docker on Windows 7.
While I was trying to configure Docker build through spotify maven plugin, I was asked to set below env variables :

2条回答
  •  遇见更好的自我
    2021-02-06 00:40

    As 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.

    In a more dynamic environment, where the boot2docker ip can change, see issue 944.

提交回复
热议问题