extract the docker NewClientWithOpts, and add connectionhelper for DOCKER_HOST set to ssh://remote (#207)

Signed-off-by: Sven Dowideit <[email protected]>

Co-authored-by: Casey Lee <[email protected]>
This commit is contained in:
Sven DowideitandCasey Lee authored and GitHub committed 2020-05-03 21:15:42 -07:00
1 parent ef9fab9fad
commit 6196436f70
7 files changed
+42 -15

No files matched your search

+1 -3
View File
@@ -3,7 +3,6 @@ package container
import (
"context"
"github.com/docker/docker/client"
"github.com/nektos/act/pkg/common"
)
@@ -17,11 +16,10 @@ func NewDockerVolumeRemoveExecutor(volume string, force bool) common.Executor {
return nil
}
cli, err := client.NewClientWithOpts(client.FromEnv)
cli, err := GetDockerClient(ctx)
if err != nil {
return err
}
cli.NegotiateAPIVersion(ctx)
return cli.VolumeRemove(ctx, volume, force)
}