extract the docker NewClientWithOpts, and add connectionhelper for DOCKER_HOST set to ssh://remote (#207)
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user