Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ linters-settings:
# buildkit errdefs package (or vice-versa).
- pkg: "github.com/containerd/errdefs"
alias: "cerrdefs"
# Use a consistent alias to prevent confusion with "github.com/moby/buildkit/client"
- pkg: "github.com/docker/docker/client"
alias: "dockerclient"
- pkg: "github.com/opencontainers/image-spec/specs-go/v1"
alias: "ocispecs"
- pkg: "github.com/opencontainers/go-digest"
Expand Down
6 changes: 3 additions & 3 deletions util/dockerutil/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package dockerutil
import (
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/context/docker"
"github.com/docker/docker/client"
dockerclient "github.com/docker/docker/client"
)

// ClientAPI represents an active docker API object.
type ClientAPI struct {
client.APIClient
dockerclient.APIClient
}

func NewClientAPI(cli command.Cli, ep string) (*ClientAPI, error) {
Expand Down Expand Up @@ -36,7 +36,7 @@ func NewClientAPI(cli command.Cli, ep string) (*ClientAPI, error) {
return nil, err
}

ca.APIClient, err = client.NewClientWithOpts(clientOpts...)
ca.APIClient, err = dockerclient.NewClientWithOpts(clientOpts...)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions util/dockerutil/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/docker/buildx/util/progress"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/client"
dockerclient "github.com/docker/docker/client"
)

// Client represents an active docker object.
Expand All @@ -24,7 +24,7 @@ func NewClient(cli command.Cli) *Client {
}

// API returns a new docker API client.
func (c *Client) API(name string) (client.APIClient, error) {
func (c *Client) API(name string) (dockerclient.APIClient, error) {
if name == "" {
name = c.cli.CurrentContext()
}
Expand Down