Skip to content

Commit

Permalink
fix(buildx): download all architecture images
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Goller <[email protected]>
  • Loading branch information
goller committed Aug 18, 2023
1 parent 34e53ee commit aa7b04d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/cmd/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

Expand All @@ -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
Expand Down

0 comments on commit aa7b04d

Please sign in to comment.