-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
synthetic runtime mounts are again being serialized into layers #5592
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Comments
Ahh, this logic ultimately comes from fbd1392a46558eb4adb368ba37fdce2b45013c1f which tried to paper over this underlying bug. |
cgwalters
added a commit
to cgwalters/bootc
that referenced
this issue
Jun 18, 2024
- Pass `--timestamp` to podman build to squash timestamps in order to gain reproducibilty, working around containers/buildah#5592 - Fix the xattr reading code to correctly skip trailing nils
cgwalters
added a commit
to cgwalters/bootc
that referenced
this issue
Jun 18, 2024
- Pass `--timestamp` to podman build to squash timestamps in order to gain reproducibilty, working around containers/buildah#5592 - Fix the xattr reading code to correctly skip trailing nils Signed-off-by: Colin Walters <[email protected]>
A friendly reminder that this issue had no activity for 30 days. |
Ah sorry there are duplicate issues, closing in favor of #4242 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was trying to write some guidance on reproducible/optimized container builds, and ran headfirst into the issue where podman/buildah inject generated internal tmpfs mount content into the tar stream, but docker doesn't is back (or maybe was never really fixed, I didn't double check at the time):
This container file is constructed such that it should result in a reproducible tar stream each time we do a build (i.e. two
podman build --no-cache
should result in the same diffid):(We could of course just run
touch
, but I like to demonstrate in this how one can usetouch -r
to canonicalize timestamps in a less trivial use case, such as after runningcurl
or whatever)(The
/etc
there is really/etc/hostname
; not sure why the diff is apparently recursive in the/run
case but not the/etc
case)It's not just the presence of this cruft that's problematic, it's that the build process serializes the current time into the tar stream for them, which defeats reproducible builds.
Now, running
podman build --timestamp=<something>
will paper over this; but that's a big/crude hammer, and while I've been recommending it in some places I am pretty sure it can easily introduce the same issues with e.g. Python that we've seen in ostree (ref ostreedev/ostree#1469 ).(Time passes)
Oh hey, I went to double check vs the latest docker (26.1.4), and it has a different variant of this bug where it apparently serializes just the top-level mount directories it injected at build time:
I'm pretty sure this is a regression on their side, but not sure I care enough to dig up the version of docker I used in 2021 to double check.
The text was updated successfully, but these errors were encountered: