-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
93 additions
and
36 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
integration/dockerfiles/Dockerfile_test_pre_defined_build_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# ingegration test for pre-defined build args; see pkg/dockerfile/buildargs.go | ||
FROM alpine:3 AS builder | ||
ARG BUILDPLATFORM | ||
ARG BUILDOS | ||
ARG BUILDARCH | ||
ARG BUILDVARIANT | ||
ARG TARGETPLATFORM | ||
ARG TARGETOS | ||
ARG TARGETARCH | ||
ARG TARGETVARIANT | ||
ARG TARGETSTAGE | ||
RUN echo "BUILDPLATFORM: ${BUILDPLATFORM}" && \ | ||
echo "BUILDOS: ${BUILDOS}" && \ | ||
echo "BUILDARCH: ${BUILDARCH}" && \ | ||
echo "BUILDVARIANT: ${BUILDVARIANT}" && \ | ||
echo "TARGETPLATFORM: ${TARGETPLATFORM}" && \ | ||
echo "TARGETOS: ${TARGETOS}" && \ | ||
echo "TARGETARCH: ${TARGETARCH}" && \ | ||
echo "TARGETVARIANT: ${TARGETVARIANT}" && \ | ||
echo "TARGETSTAGE: ${TARGETSTAGE}" | ||
RUN uname -a | ||
COPY foo /app/foo | ||
RUN echo 'add line' >> /app/foo | ||
|
||
FROM alpine:3 | ||
COPY --from=builder /app/foo /app/foo | ||
ARG BUILDPLATFORM | ||
ARG BUILDOS | ||
ARG BUILDARCH | ||
ARG BUILDVARIANT | ||
ARG TARGETPLATFORM | ||
ARG TARGETOS | ||
ARG TARGETARCH | ||
ARG TARGETVARIANT | ||
ARG TARGETSTAGE | ||
RUN echo "BUILDPLATFORM: ${BUILDPLATFORM}" && \ | ||
echo "BUILDOS: ${BUILDOS}" && \ | ||
echo "BUILDARCH: ${BUILDARCH}" && \ | ||
echo "BUILDVARIANT: ${BUILDVARIANT}" && \ | ||
echo "TARGETPLATFORM: ${TARGETPLATFORM}" && \ | ||
echo "TARGETOS: ${TARGETOS}" && \ | ||
echo "TARGETARCH: ${TARGETARCH}" && \ | ||
echo "TARGETVARIANT: ${TARGETVARIANT}" && \ | ||
echo "TARGETSTAGE: ${TARGETSTAGE}" | ||
RUN uname -a | ||
RUN cat /app/foo |
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
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