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
ADD will ensure the mtime of the /sbin/tini file matches the Last-modified-by header.
However the layer also contains the /sbin directory, and the /sbin directory's mtime is set to the current time during the build. This means this step isn't reproducible, because the different mtime will result in a different layer tarball.
I'm running Docker Desktop 4.19.0, which I know is running an older buildkit without SOURCE_DATE_EPOCH support. But the SOURCE_DATE_EPOCH docs say that "Minimal support is also available on older BuildKit when using Dockerfile 1.5 frontend." so I thought I could use SOURCE_DATE_EPOCH to set the mtime of the /sbin directory. But this seems to have no effect - when I try to build with SOURCE_DATE_EPOCH=0, the /sbin directory's mtime in the ADD layer is still the current time, not the unix epoch.
I'm trying to reproducibly install
tini
into a container, so I'm using theADD
command:ADD will ensure the mtime of the
/sbin/tini
file matches theLast-modified-by
header.However the layer also contains the
/sbin
directory, and the/sbin
directory's mtime is set to the current time during the build. This means this step isn't reproducible, because the different mtime will result in a different layer tarball.I'm running Docker Desktop 4.19.0, which I know is running an older buildkit without SOURCE_DATE_EPOCH support. But the SOURCE_DATE_EPOCH docs say that "Minimal support is also available on older BuildKit when using Dockerfile 1.5 frontend." so I thought I could use SOURCE_DATE_EPOCH to set the mtime of the
/sbin
directory. But this seems to have no effect - when I try to build with SOURCE_DATE_EPOCH=0, the/sbin
directory's mtime in the ADD layer is still the current time, not the unix epoch.Minimal dockerfile:
Built using:
To discover the mtime, I used
docker save
and manually inspected thelayer.tar
file.More environment details:
The text was updated successfully, but these errors were encountered: