chainguard-dev / apko

Build OCI images from APK packages directly without Dockerfile
https://apko.dev
Apache License 2.0
1.2k stars 122 forks source link

Keep apk modtime #1305

Closed jonjohnsonjr closed 2 months ago

jonjohnsonjr commented 2 months ago

We were overwriting all the file timestamps with a configurable SOURCE_DATE_EPOCH, which was always the unix epoch. The only reason we were doing this is that we were also setting the modtime of everything to time.Now() elsewhere.

That's silly.

Instead, don't set anything to time.Now() and keep file modtimes when we add them to the filesystem. If the APKs change, nothing will be reproducible anyway, so keeping the data from the APK seems way better.