Skip to content
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

Fix: multiarch build by using crosscompilation #336

Commits on Nov 28, 2024

  1. Fix: multiarch build by using crosscompilation

    Use quay.io/centos/centos:stream9 with the –platform=$BUILDPLATFORM flag,
    in this case the image is pulled for the builder host's current architecture.
    The BUILDOS and BUILDARCH args are used to download the right go binary for
    the build platform.
    Cross-compilation occurs in the builder image using TARGETOS and TARGETARCH build arguments to determine the target OS/arch.
    These args are set automatically by the multiarch-build process (with docker buildx).
    The final container image (registry.access.redhat.com/ubi9/ubi-minimal) is pulled for the correct target architecture, such as amd64 or arm64.
    
    This update fixes support for multiarch builds and speeds up image building, as cross-compilation is faster than compiling on a non-native platform.
    
    Signed-off-by: Yury Kulazhenkov <[email protected]>
    ykulazhenkov committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    d6a30e9 View commit details
    Browse the repository at this point in the history