Created
May 3, 2023 10:36
-
-
Save emiel/334f3429a38ada0d44c3af0eae330652 to your computer and use it in GitHub Desktop.
Demonstrate ARG scoping in child stages
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
# syntax=docker/dockerfile:1 | |
FROM busybox as parent | |
ARG FOO=123 | |
FROM parent as child | |
RUN echo "FOO=${FOO}" # "FOO=123" | |
FROM busybox as final | |
RUN echo "FOO=${FOO}" # "FOO=" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment