Last active
March 31, 2022 12:45
-
-
Save developer-guy/25f88d4d07fd1c4800e4e5be4ae379b8 to your computer and use it in GitHub Desktop.
Dockerfile cross-compilation helper tonistiigi/xx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx | |
FROM base AS build | |
COPY --from=xx / / | |
ARG TARGETPLATFORM | |
RUN --mount=type=cache,target=/root/.cache/go-build \ | |
--mount=type=cache,target=/go/pkg/mod \ | |
xx-go build -o /out/example . | |
.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment