Skip to content

fix: multi-platform build #2400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

RonFed
Copy link
Contributor

@RonFed RonFed commented Jun 2, 2025

resolves #2399

@RonFed RonFed force-pushed the fix_multiplatform_build branch from e583d53 to d201d5a Compare June 2, 2025 17:51
@RonFed RonFed marked this pull request as ready for review June 2, 2025 17:51
@RonFed RonFed requested a review from a team as a code owner June 2, 2025 17:51
@RonFed
Copy link
Contributor Author

RonFed commented Jun 3, 2025

  • try using ENV in the Dockerfile (or export KEY=VAL?)

Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach causes churn in the docker builds due to unnecessary cache invalidation. We should ensure the correct build arch is set in our build process instead.

@@ -3,6 +3,7 @@
# must-have toplevel files
!/go.sum
!/go.mod
!/Makefile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this makes the docker cache invalidated on changes to the makefile. That should not happen as it does not affect the built binary.

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
GOARCH=$TARGETARCH \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not set this in the build pipeline?

@MrAlias
Copy link
Contributor

MrAlias commented Jun 16, 2025

  • try using ENV in the Dockerfile (or export KEY=VAL?)

+1 to this approach as it will persist the value during runtime.

@MrAlias
Copy link
Contributor

MrAlias commented Jun 16, 2025

  • try using ENV in the Dockerfile (or export KEY=VAL?)

+1 to this approach as it will persist the value during runtime.

#2411

@MrAlias
Copy link
Contributor

MrAlias commented Jun 20, 2025

Superseded by #2411

@MrAlias MrAlias closed this Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v0.22.0 is not built properly for arm64
2 participants