I’m trying to create a dockerized build system for a project that I’m working on.
The idea is that the SDK and all the dependancies are in a docker image that can be used easily on any system without the standard development environment setup hassles.
The issue I’m facing is that all of the files in the docker container (ie all the SDK files) are given a Last-Modified date equal to the instantiation date of the docker (aka “now”) rather than the time of image creation, which is really when they were last modified.
The result is that make wants to rebuild the whole SDK on every build… which is not going to fly with my users.
If I could set these Last-Modified dates to the time of image creation (or some other earlier date?), then make would work properly… only rebuilding things that have been updated since they were last built.
I tried recursively resetting all of the Last-Modified dates in the SDK at runtime, and that works! But again, it takes a long enough time that it no one is going to want to use this tool.