Skip to content

Commit

Permalink
Fix conversion and remove extra package
Browse files Browse the repository at this point in the history
  • Loading branch information
nwneisen committed Jun 7, 2023
1 parent 3aadfc2 commit fe87571
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libdocker/kube_docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"github.com/sirupsen/logrus"

dockertypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
dockercontainer "github.com/docker/docker/api/types/container"
dockerimagetypes "github.com/docker/docker/api/types/image"
dockerapi "github.com/docker/docker/client"
Expand Down Expand Up @@ -181,8 +180,8 @@ func (d *kubeDockerClient) StopContainer(id string, timeout time.Duration) error
ctx, cancel := d.getCustomTimeoutContext(timeout)
defer cancel()

timeoutSeconds := int(timeout / time.Second)
options := container.StopOptions{
timeoutSeconds := int(timeout.Seconds())
options := dockercontainer.StopOptions{
Timeout: &timeoutSeconds,
}

Expand Down

0 comments on commit fe87571

Please sign in to comment.