forked from uber-archive/makisu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for global ARG substitution between stages (uber-archive#325)
* It is correct to use global ARG for substition in child-stage See: moby/moby#37345 (comment) * Add missing build arg
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
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
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,11 @@ | ||
ARG version_default=v1 | ||
|
||
FROM alpine:latest as base1 | ||
ARG version_default | ||
ENV version=$version_default | ||
|
||
FROM alpine:latest as base2 | ||
ARG version_default | ||
ENV version2=$version_default | ||
|
||
ENTRYPOINT if [ -z "$version" -a "$version2" = "v2" ]; then echo "This is correct"; exit 0; else exit 1; fi |