Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Add ServerName to Docker TLS config
Browse files Browse the repository at this point in the history
Signed-off-by: Beorn Facchini <[email protected]>
  • Loading branch information
beornf committed Aug 16, 2019
1 parent 213509a commit 34cf734
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type Options struct {
TLSOptions tlsconfig.Options
TrustKey string
Host string
ServerName string
APIVersion string
}

Expand Down Expand Up @@ -87,6 +88,10 @@ func Create(c Options) (client.APIClient, error) {
return nil, err
}

if c.ServerName != "" {
config.ServerName = c.ServerName
}

httpClient = &http.Client{
Transport: &http.Transport{
TLSClientConfig: config,
Expand Down

0 comments on commit 34cf734

Please sign in to comment.