Closed orishavit closed 6 months ago
User $BUILDPLATFORM in build stage in Dockerfile: This will cause the builder image to be arm64 on Macs, and amd64 on CI and other environments.
Not cross-compiling arm64->amd64 on macs is significantly faster. The resulting images are without change.
https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
Description
User $BUILDPLATFORM in build stage in Dockerfile: This will cause the builder image to be arm64 on Macs, and amd64 on CI and other environments.
Not cross-compiling arm64->amd64 on macs is significantly faster. The resulting images are without change.
References
https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/