You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the layered jar file approach to reduce the amount of data included in the context sent to the docker daemon. The Docker buildkit [1] functionality adds some intelligence around which files are sent to the Docker daemon. Unfortunately, rather than examining file checksums it appears to be looking at file timestamps. Extracting of the jar file layers using the following command does not preserve file timestamps therefore the entire set of dependency jar files is sent to the daemon each time a build is performed.
wilkinsona
changed the title
java layertools extract does not preserve timestamps
Layertools extract does not preserve last modified and last access times
Oct 4, 2021
I am using the layered jar file approach to reduce the amount of data included in the context sent to the docker daemon. The Docker buildkit [1] functionality adds some intelligence around which files are sent to the Docker daemon. Unfortunately, rather than examining file checksums it appears to be looking at file timestamps. Extracting of the jar file layers using the following command does not preserve file timestamps therefore the entire set of dependency jar files is sent to the daemon each time a build is performed.
I asked this question over on SO and was referred here [2].
Running that command and then checking the timestamps produces this:
...and then running it again ~5 minutes later it produces a fresh set of timestamps:
[1] https://docs.docker.com/develop/develop-images/build_enhancements/
[2] https://stackoverflow.com/questions/69406916/java-layertools-extract-does-not-preserve-timestamps
The text was updated successfully, but these errors were encountered: