Skip to content

Commit 8b769ba

Browse files
thaJeztahndeloof
authored andcommitted
pkg/compose: remove dependency on github.com/docker/buildx/driver
The driver.Auth interface was describing the configfile.GetAuthConfig implementation; define a local interface instead of using buildx's definition as an intermediate. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 671507a commit 8b769ba

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/compose/pull.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import (
2929

3030
"github.com/compose-spec/compose-go/v2/types"
3131
"github.com/distribution/reference"
32-
"github.com/docker/buildx/driver"
3332
"github.com/docker/cli/cli/config/configfile"
33+
clitypes "github.com/docker/cli/cli/config/types"
3434
"github.com/docker/docker/api/types/image"
3535
"github.com/docker/docker/client"
3636
"github.com/docker/docker/pkg/jsonmessage"
@@ -260,7 +260,11 @@ func ImageDigestResolver(ctx context.Context, file *configfile.ConfigFile, apiCl
260260
}
261261
}
262262

263-
func encodedAuth(ref reference.Named, configFile driver.Auth) (string, error) {
263+
type authProvider interface {
264+
GetAuthConfig(registryHostname string) (clitypes.AuthConfig, error)
265+
}
266+
267+
func encodedAuth(ref reference.Named, configFile authProvider) (string, error) {
264268
authConfig, err := configFile.GetAuthConfig(registry.GetAuthConfigKey(reference.Domain(ref)))
265269
if err != nil {
266270
return "", err

0 commit comments

Comments
 (0)