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
add option to bind mount (pod managed) /etc/* files to nonstandard locations #12691
Comments
Not sure what the issue you are attempting to fix. Do you want to have a chroot within a container which would see the hosts file created within the pod? |
Exactly
I believe that a container separates an abstract service (e.g., an SMTP server) from the host that runs the server. |
In this case you would want the hosts file mounted twice. What about the resolv.conf and other files created by Podman to be mounted into the container. |
Then I suppose we should generalize the issue. :) |
Are you mounting these in the same location under the chroot IE would And you end up with /var/run/foo/etc/hosts? |
I hope I am understanding you correctly. |
I just don't want to be specific to etc. Not that we currently generate other files, I believe but keep out options open. |
Indeed, yours is the better alternative. :) |
@vrothberg @giuseppe Thoughts? |
I am OK with it. |
@LStandman interested in opening a PR for this? |
Sure why not |
A friendly reminder that this issue had no activity for 30 days. |
@LStandman did you ever make any progress? |
Hi, yes I'm about done with it. |
A friendly reminder that this issue had no activity for 30 days. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
There are programs that allow some daemons to run chrooted for some added security within the program. (e.g., Postfix.)
Within a pod /etc/hosts is managed by the pod and automatically bind mounted to guest:/etc/hosts.
Perhaps podman run should expose an option to bind mount that pod-managed hosts file into alternative/additional locations within the guest. E.g., podman run --hostsfile-targets=/var/run/foo bar
Best regards,
LS
The text was updated successfully, but these errors were encountered: