Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 34cf734

Browse files
committed
Add ServerName to Docker TLS config
Signed-off-by: Beorn Facchini <[email protected]>
1 parent 213509a commit 34cf734

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/client/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type Options struct {
4040
TLSOptions tlsconfig.Options
4141
TrustKey string
4242
Host string
43+
ServerName string
4344
APIVersion string
4445
}
4546

@@ -87,6 +88,10 @@ func Create(c Options) (client.APIClient, error) {
8788
return nil, err
8889
}
8990

91+
if c.ServerName != "" {
92+
config.ServerName = c.ServerName
93+
}
94+
9095
httpClient = &http.Client{
9196
Transport: &http.Transport{
9297
TLSClientConfig: config,

0 commit comments

Comments
 (0)