Last active
December 26, 2021 18:32
-
-
Save DerekChia/3720bf92d31a2cf307eef2b0059c09a8 to your computer and use it in GitHub Desktop.
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
$ docker build --build-arg SOME_VAR=new-value --no-cache -t demo . | |
### REMOVED ### | |
Step 2/5 : ENV SOME_VAR=env-value | |
---> Running in 10d7cb325994 | |
Removing intermediate container 10d7cb325994 | |
---> dcab47c67952 | |
Step 3/5 : ARG SOME_VAR=arg-value | |
---> Running in 265c48974673 | |
Removing intermediate container 265c48974673 | |
---> 3fab670db0bf | |
Step 4/5 : RUN echo "Build-time: SOME_VAR is set to ${SOME_VAR:-}" | |
---> Running in 0339a0690972 | |
Build-time: SOME_VAR is set to env-value | |
Removing intermediate container 0339a0690972 | |
---> aa61afbb01cd | |
### 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