Skip to content

Instantly share code, notes, and snippets.

@emiel
Created May 3, 2023 10:36
Show Gist options
  • Save emiel/334f3429a38ada0d44c3af0eae330652 to your computer and use it in GitHub Desktop.
Save emiel/334f3429a38ada0d44c3af0eae330652 to your computer and use it in GitHub Desktop.
Demonstrate ARG scoping in child stages
# 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