Skip to content

Commit

Permalink
docker: dial session directly with http hijack
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <[email protected]>
  • Loading branch information
tonistiigi committed Oct 21, 2021
1 parent 084b6c0 commit 2644d56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions driver/docker/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func (d *Driver) Rm(ctx context.Context, force bool, rmVolume bool) error {
func (d *Driver) Client(ctx context.Context) (*client.Client, error) {
return client.New(ctx, "", client.WithContextDialer(func(context.Context, string) (net.Conn, error) {
return d.DockerAPI.DialHijack(ctx, "/grpc", "h2c", nil)
}), client.WithSessionDialer(func(ctx context.Context, proto string, meta map[string][]string) (net.Conn, error) {
return d.DockerAPI.DialHijack(ctx, "/session", proto, meta)
}))
}

Expand Down

0 comments on commit 2644d56

Please sign in to comment.