Skip to content
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

Use an overlayfs on /etc to keep monitored files updated #5528

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swick
Copy link
Contributor

@swick swick commented Sep 22, 2023

Currently the monitored files are mounted in /run/host/monitor/ and individual files are symlinked there from /etc. If the file in /etc must be a symlink itself this approach is failing (#5514).

This patch sets up an overlayfs with /run/host/monitor/ as the upper layer and /etc as the lower layer and mount target. /etc itself is bind mounted instead of the individual files and folders which makes the whole dir read-only but we provide another overlay layer, /run/etc-overlay is created to make it possible to override files in /etc per-container.

Everything seems to work. The implementation assumes that bwrap always supports --overlay. A real implementation would have to support the current code paths and the overlay stuff at the same time.

bwrap --overlay support is here containers/bubblewrap#596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant