Created
March 17, 2017 05:04
-
-
Save tonistiigi/775cb15d3918958020bdd0165f776005 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
# cat <<EOT > Dockerfile | |
heredoc> from busybox | |
heredoc> copy foo / | |
heredoc> EOT | |
# echo "bar" > foo | |
# docker build . | |
Sending build context to Docker daemon 4.096 kB | |
Step 1/2 : FROM busybox | |
---> 7968321274dc | |
Step 2/2 : COPY foo / | |
---> 90c37559c514 | |
Removing intermediate container f2ae96b9beb4 | |
Successfully built 90c37559c514 | |
# ln foo abc | |
# docker build . | |
Sending build context to Docker daemon 3.584 kB | |
Step 1/2 : FROM busybox | |
---> 7968321274dc | |
Step 2/2 : COPY foo / <<<<<<------------- NO CACHE | |
---> 063c39051fdc | |
Removing intermediate container 0b266d615123 | |
Successfully built 063c39051fdc | |
# echo "new data" >> foo | |
# docker build . | |
Sending build context to Docker daemon 3.584 kB | |
Step 1/2 : FROM busybox | |
---> 7968321274dc | |
Step 2/2 : COPY foo / | |
---> Using cache <<<<<<------------- USING CACHE | |
---> 063c39051fdc | |
Successfully built 063c39051fdc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment