Skip to content

Commit ea5de14

Browse files
dilyevskyclaude
andcommitted
fix: explicitly set platform for crane container
Dagger was inferring wrong platform. Explicitly use host platform. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fd4a340 commit ea5de14

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ci/main.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -598,14 +598,12 @@ func hostPlatform() string {
598598

599599
// CraneContainer returns a container with crane installed and authenticated.
600600
func (m *ApoxyCli) CraneContainer(ctx context.Context, registryPassword *dagger.Secret) *dagger.Container {
601-
cranePlatform := hostArch()
602-
if cranePlatform == "x86_64" {
603-
cranePlatform = "x86_64"
604-
} else if cranePlatform == "aarch64" {
601+
cranePlatform := "x86_64"
602+
if runtime.GOARCH == "arm64" {
605603
cranePlatform = "arm64"
606604
}
607605

608-
return dag.Container().
606+
return dag.Container(dagger.ContainerOpts{Platform: dagger.Platform(hostPlatform())}).
609607
From("alpine:latest").
610608
WithExec([]string{"apk", "add", "--no-cache", "curl"}).
611609
WithExec([]string{
@@ -893,4 +891,3 @@ func (m *ApoxyCli) PublishHelmRelease(
893891
}).
894892
Stdout(ctx)
895893
}
896-

0 commit comments

Comments
 (0)