From 2644d56a6de61ee987abc25717b698d9930e16cd Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Sun, 17 Oct 2021 20:15:57 -0700 Subject: [PATCH] docker: dial session directly with http hijack Signed-off-by: Tonis Tiigi --- driver/docker/driver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/driver/docker/driver.go b/driver/docker/driver.go index af94f093..f38ec165 100644 --- a/driver/docker/driver.go +++ b/driver/docker/driver.go @@ -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) })) }