Skip to content

Instantly share code, notes, and snippets.

@DerekChia
Last active December 26, 2021 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DerekChia/627b3345a85b38898dbfca0bfaea1e28 to your computer and use it in GitHub Desktop.
Save DerekChia/627b3345a85b38898dbfca0bfaea1e28 to your computer and use it in GitHub Desktop.
$ docker build --no-cache -t demo .
### REMOVED ###
Step 2/5 : ENV SOME_VAR=env-value
---> Running in ed8e108898e4
Removing intermediate container ed8e108898e4
---> 43da9e8e6dd6
Step 3/5 : ARG SOME_VAR=arg-value
---> Running in fb03d6097fb1
Removing intermediate container fb03d6097fb1
---> 853bb58e415e
Step 4/5 : RUN echo "Build-time: SOME_VAR is set to ${SOME_VAR:-}"
---> Running in 709fd76468fa
Build-time: SOME_VAR is set to env-value
### REMOVED ###
$ docker run --rm demo
Run-time: SOME_VAR is set to env-value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment