-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
--init fail to work when mounting /dev #14251
Comments
Thanks for reaching out, @fruch. I can reproduce with Podman v4.1. |
I think the problem is that we mount the init binary to |
I have the same suspicion, but did not confirm yet. Time to tackle the issue? |
Seems like it should be an easy fix. |
Not sure what the fix should look like? I doubt that just adding the Is there any reason why the path has to be |
I think the reason for /dev was to prevent creating a new inode in the image. I would prefer /run/init since this is where we are already creating content. /run/.containerenv, /run/secret ... |
Docker mounts it there, so I'd categorize it as compat. Not sure how Docker behaves with dev being mounted like that. |
Docker does not bind-mount to /dev anymore (moby/moby@bcacbf5). I am preparing a fix. |
I can confirm that docker is working with it just fine, the whole reason I need it, so i can have compatibility with already working docker environment. |
The init binary until now has been bind-mounted to /dev/init which breaks when bind-mounting to /dev. Instead mount the init to /run/podman-init. The reasoning for using /run is that it is already used for other runtime data such as secrets. Fixes: containers#14251 Signed-off-by: Valentin Rothberg <[email protected]>
The init binary until now has been bind-mounted to /dev/init which breaks when bind-mounting to /dev. Instead mount the init to /run/podman-init. The reasoning for using /run is that it is already used for other runtime data such as secrets. Fixes: containers#14251 Signed-off-by: Valentin Rothberg <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Using podman run with --init, while mounting /dev into the container, doesn't work
Steps to reproduce the issue:
Describe the results you received:
got the error from above
Describe the results you expected:
expect the run command to run the command in the container
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: