Last active
November 4, 2023 07:08
-
-
Save richlander/70cde3f0176d36862af80c41722acd47 to your computer and use it in GitHub Desktop.
Dockerfile built-in ARGs
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 alpine | |
ARG TARGETPLATFORM | |
ARG TARGETOS | |
ARG TARGETARCH | |
ARG TARGETVARIANT | |
ARG BUILDPLATFORM | |
ARG BUILDOS | |
ARG BUILDARCH | |
ARG BUILDVARIANT | |
RUN echo "Building on $BUILDPLATFORM, targeting $TARGETPLATFORM" | |
RUN echo "Building on ${BUILDOS} and ${BUILDARCH} with optional variant ${BUILDVARIANT}" | |
RUN echo "Targeting ${TARGETOS} and ${TARGETARCH} with optional variant ${TARGETVARIANT}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See: https://docs.docker.com/build/building/multi-platform/