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 :
DOCKER_HOST
DOCKER_CERT_PATH
DOCKER_TLS_VERIFY
Configuration was successful but am not sure
What does the DOCKER_TLS_VERIFY
and DOCKER_CERT_PATH
variables do ?
DOCKER_TLS_VERIFY is a environment variable and not a docker daemon config file options. See: https://docs.docker.com/engine/reference/commandline/dockerd/#/daemon-configuration-file for the documentation.
DOCKER_CERT_PATH. Configures the path to the ca. pem , cert. pem , and key. pem files used for TLS verification.
“DOCKER_HOST” tells the client how to connect to the daemon. The default is a local socket.
It's not stored (in a file) anywhere. It's passed from Docker to the process running in the container.
Please check below comments for now. I'm not a Go developer but I understand usage from it. To be edited later as it is too Spartan.
from https://github.com/docker/docker/blob/3ea762b9f6ba256cf51bd2c35988f0c48bccf0b0/client/client.go
[...]
// Use DOCKER_HOST to set the url to the docker server.
// Use DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest.
// Use DOCKER_CERT_PATH to load the tls certificates from.
// Use DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default.
func NewEnvClient() (*Client, error) {
var client *http.Client
if dockerCertPath := os.Getenv("DOCKER_CERT_PATH"); dockerCertPath != "" {
options := tlsconfig.Options{
CAFile: filepath.Join(dockerCertPath, "ca.pem"),
CertFile: filepath.Join(dockerCertPath, "cert.pem"),
KeyFile: filepath.Join(dockerCertPath, "key.pem"),
InsecureSkipVerify: os.Getenv("DOCKER_TLS_VERIFY") == "",
[...]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With