$ docker build --build-arg FOO=BAR -t test .
Sending build context to Docker daemon 3.072 kB
Step 1 : FROM alpine:3.4
---> 4e38e38c8ce0
Step 2 : ARG FOO
---> Running in c5c23c421a6c
---> b251b85eefb1
Removing intermediate container c5c23c421a6c
Step 3 : ADD test.sh .
---> 86b3a69480a6
Removing intermediate container 7951d7e2806a
Step 4 : RUN ./test.sh
---> Running in 9540d627df3f
BAR
---> 028dce4ef40a
Removing intermediate container 9540d627df3f
Successfully built 028dce4ef40a
Created
September 23, 2016 21:31
-
-
Save pmbauer/0302fe5611db678e3a22e255e3b29c1b 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
FROM alpine:3.4 | |
ARG FOO | |
ADD test.sh . | |
RUN ./test.sh |
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
#!/bin/sh | |
echo $FOO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment