Last active
January 2, 2016 14:39
-
-
Save aanand/8318156 to your computer and use it in GitHub Desktop.
Dockerfile ADD caching bug
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 ubuntu | |
ADD foo.txt /foo.txt |
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
old content |
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 version | |
Client version: 0.7.4 | |
Go version (client): go1.2 | |
Git commit (client): 010d74e | |
Server version: 0.7.4 | |
Git commit (server): 010d74e | |
Go version (server): go1.2 | |
Last stable version: 0.7.4 | |
$ docker build -t cache-test . | |
Uploading context 10.24 kB | |
Uploading context | |
Step 1 : FROM ubuntu | |
---> 8dbd9e392a96 | |
Step 2 : ADD foo.txt /foo.txt | |
---> 1506c7614be0 | |
Successfully built 1506c7614be0 | |
$ docker run cache-test cat /foo.txt | |
old content | |
$ echo "new content" > foo.txt | |
$ docker build -t cache-test . | |
Uploading context 10.24 kB | |
Uploading context | |
Step 1 : FROM ubuntu | |
---> 8dbd9e392a96 | |
Step 2 : ADD foo.txt /foo.txt | |
---> Using cache | |
---> 1506c7614be0 | |
Successfully built 1506c7614be0 | |
$ docker run cache-test cat /foo.txt | |
old content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment