From 8b769bad6b3a036ae06df50b46bb05319bb6b900 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 29 Jan 2026 13:48:02 +0100 Subject: [PATCH] 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 --- pkg/compose/pull.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/compose/pull.go b/pkg/compose/pull.go index e2845aad8..bcc466646 100644 --- a/pkg/compose/pull.go +++ b/pkg/compose/pull.go @@ -29,8 +29,8 @@ import ( "github.com/compose-spec/compose-go/v2/types" "github.com/distribution/reference" - "github.com/docker/buildx/driver" "github.com/docker/cli/cli/config/configfile" + clitypes "github.com/docker/cli/cli/config/types" "github.com/docker/docker/api/types/image" "github.com/docker/docker/client" "github.com/docker/docker/pkg/jsonmessage" @@ -260,7 +260,11 @@ func ImageDigestResolver(ctx context.Context, file *configfile.ConfigFile, apiCl } } -func encodedAuth(ref reference.Named, configFile driver.Auth) (string, error) { +type authProvider interface { + GetAuthConfig(registryHostname string) (clitypes.AuthConfig, error) +} + +func encodedAuth(ref reference.Named, configFile authProvider) (string, error) { authConfig, err := configFile.GetAuthConfig(registry.GetAuthConfigKey(reference.Domain(ref))) if err != nil { return "", err