forked from openshift/imagebuilder
-
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.
env,unset: support syntax to error on unset vars
Docker supports ${SOME_VAR:?} syntax, which will give an error at build if SOME_VAR is unset. ```dockerfile FROM alpine ARG USERID USER ${USERID:?} ``` ```console Failed to process `${USERID:?}`: USERID is not allowed to be unset ``` Closes: containers/buildah#4284 Ref: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02 Signed-off-by: Aditya R <arajan@redhat.com>
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM busybox | ||
|
||
ARG FOO | ||
ENV FOO=${FOO:?} | ||
LABEL test="$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