Replies: 2 comments 10 replies
-
In the short term my recommendation is for cases like podman machine to pre-create in their container build all the toplevel directories they may need by default. It's OK to ship an empty That said, for those that have a need for truly dynamic management, a simple option is to enable transient root. However that's a big hammer. What would be possible to do is enable transient root, but add code into the initramfs which creates those toplevel directories and then remounts the root readonly. This would mean discovery of the desired state would need to be handled in the initramfs. Finally, one option we could add is something like |
Beta Was this translation helpful? Give feedback.
-
you mean this |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Today "podman machine" is a VM that wants to bind mount (via virtiofs) paths into the VM that match the host which could be platform specific or even dynamic. On MacOS for example, the home directory is called
/Users
and the way things work is that the container bind mounts (in the VM) that same absolute path.How to deal with this with a readonly
/
?Current solutions:
ostree.prepare-root.composefs=0
to the kernel arguments and rebootroot.transient
Option: Add
root = transient-ro
Like
root = transient
but we'd allocate the overlayfs upper, but still keep it read-only by default. This would make it easy for code running in the real root to unshare the mount namespace, mount it writable and mutate it while still keeping it read-only for most use cases. This would be a pretty easy addition to ostree-prepare-root.Beta Was this translation helpful? Give feedback.
All reactions