Closed withinboredom closed 7 years ago
@withinboredom I can't reproduce it.
☁ tmp3 rocker build
INFO[0000] FROM ubuntu
INFO[0000] | Image sha256:104be size=129 MB
INFO[0000] RUN apt-get update
INFO[0000] | Cached! Take image sha256:ba269 size=168.4 MB (+39.49 MB)
INFO[0000] COPY ./dir /dir
INFO[0000] | Calculating tarsum for 1 files (0 B total)
INFO[0000] | Not cached
INFO[0000] | Created container 9e3cb241f2be (image sha256:ba269)
INFO[0000] | Uploading files to container 9e3cb241f2be
INFO[0000] Commit changes
INFO[0000] | Result image is sha256:6b813 size=168.4 MB (+0 B)
INFO[0000] | Removing container 9e3cb241f2be
INFO[0000] RUN apt-get update
INFO[0001] | Created container 1079e3f40cc6 (image sha256:6b813)
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [268 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [144 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [568 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [469 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-security/main Sources [64.9 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-security/universe Sources [17.2 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages [245 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [80.1 kB]
Fetched 2061 kB in 1s (1898 kB/s)
Reading package lists...
INFO[0004] Commit changes
INFO[0004] | Result image is sha256:8f000 size=171.9 MB (+3.449 MB)
INFO[0004] | Removing container 1079e3f40cc6
INFO[0004] Cleaning up
INFO[0004] Successfully built sha256:8f000 | final size 171.9 MB (+42.94 MB from the base image)
☁ tmp3 rocker build
INFO[0000] FROM ubuntu
INFO[0000] | Image sha256:104be size=129 MB
INFO[0000] RUN apt-get update
INFO[0000] | Cached! Take image sha256:ba269 size=168.4 MB (+39.49 MB)
INFO[0000] COPY ./dir /dir
INFO[0000] | Calculating tarsum for 1 files (0 B total)
INFO[0000] | Cached! Take image sha256:6b813 size=168.4 MB (+0 B)
INFO[0000] RUN apt-get update
INFO[0000] | Cached! Take image sha256:8f000 size=171.9 MB (+3.449 MB)
INFO[0000] Cleaning up
INFO[0000] Successfully built sha256:8f000 | final size 171.9 MB (+42.94 MB from the base image)
Are you sure, you didn't change anything in last command before run? (RUN cd /app/js && yarn && NODE_ENV=production node_modules/.bin/webpack -p && rm -rf /app/js
)
Here's an excerpt of the build log:
Either the last
COPY
or the lastRUN
command will returnNot cached
even if no files change. This makes no sense to me. If everything before aRUN
is cached, why wasn't theRUN
cached?