From aa7b04d368284434ec007c92e11985ea5b1f5713 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Fri, 18 Aug 2023 13:48:53 -0500 Subject: [PATCH] fix(buildx): download all architecture images Signed-off-by: Chris Goller --- pkg/cmd/docker/docker.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/cmd/docker/docker.go b/pkg/cmd/docker/docker.go index 9be44397..f37d640c 100644 --- a/pkg/cmd/docker/docker.go +++ b/pkg/cmd/docker/docker.go @@ -249,9 +249,7 @@ func runConfigureBuildx(ctx context.Context, dockerCli command.Cli, project, tok // Docker uses the first node as default. We try our best to prefer the // local machine's architecture. - preferredArch := "amd64" if strings.Contains(runtime.GOARCH, "arm") { - preferredArch = "arm64" ng.Nodes[0], ng.Nodes[1] = ng.Nodes[1], ng.Nodes[0] } @@ -265,9 +263,11 @@ func runConfigureBuildx(ctx context.Context, dockerCli command.Cli, project, tok return fmt.Errorf("unable to use node group: %w", err) } - err = Bootstrap(ctx, dockerCli, image, projectName, token, preferredArch) - if err != nil { - return fmt.Errorf("unable create driver container: %w", err) + for _, arch := range []string{"amd64", "arm64"} { + err = Bootstrap(ctx, dockerCli, image, projectName, token, arch) + if err != nil { + return fmt.Errorf("unable create driver container: %w", err) + } } return nil