Last active
November 4, 2023 07:08
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/