Skip to content

Commit

Permalink
Add option to set TLS from environment variable
Browse files Browse the repository at this point in the history
Add option to set TLS in default docker config from environment variable DOCKER_TLS, same as docker cli (docker/cli#863)
  • Loading branch information
mtatheonly committed Feb 10, 2020
1 parent ecf5524 commit 510eba1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/docker/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ func GetDefaultDockerConfig() *api.DockerConfig {
cfg.TLSVerify = true
}

if useTLS := os.Getenv("DOCKER_TLS"); useTLS != "" {
cfg.UseTLS = true
}

return cfg
}

Expand Down

0 comments on commit 510eba1

Please sign in to comment.