-
Notifications
You must be signed in to change notification settings - Fork 814
buildah is not relabeling mounted paths and instead relies on the OCI runtime to do this #6071
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
Comments
We made runc return an error in 1.2 when you specify a superblock flag for bind-mounts. Previously this was silently ignored, but now you get the error you see here. opencontainers/runc#3990 I dunno if crun has special handling of |
I also use OpenSuse Tumbleweed on two systems. The old but updated system was able to run the container, but the new system with the same Podman version was not able to start the server. Build without
Build with
Temporary workaround: Instead of...
use:
So add the |
I found out that in my case it's all about the Not working:
Working:
My temporary workaround with @ricardobranco777 Your SUSE bug report can't be accessed publicly, is it possible to change the visibility? |
It's just a tracker bug that right now only contains a link to this issue. |
It appears as if buildah is not relabeling mounted directories itself and instead relies on the OCI runtime to perform this action, which is not really spec compliant.
To reproduce this issue, use the following
Dockerfile
:and run
buildah bud --runtime /usr/bin/crun -f containerfile .
which succeeds, whereas it fails with runc:The error here is coming from runc directly: https://github.com/opencontainers/runc/blob/8b98e829f0934fc043f57d73b5c2ee091252a1d2/libcontainer/configs/validate/validator.go#L307
runc throws this warning because it doesn't perform any special handling of the
Z
flag, whereas crun apparently does (however, it probably shouldn't).The issue in buildah specifically is, that it doesn't appear to perform the same mount flag "sanitation" that podman does, which drops the
z
orZ
flags and relabels the bind mounted directories: https://github.com/danishprakash/podman/blob/29a90c3f8a1375b585dd3a870f7569ed2599426f/libpod/container_internal_common.go#L282cc @danishprakash @cyphar
The text was updated successfully, but these errors were encountered: