![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://lemmy.world/pictrs/image/8286e071-7449-4413-a084-1eb5242e2cf4.png)
2·
10 months agoUpdate: I took some suggestions and ideas from the comments here and built a system for this:
- Create the mountpoint directories
- Add the mounts to /etc/fstab with the
user,noauto
option - I’m using quadlets, so add a new
[
section to my container file and add ]ExecStartPre
andExecStopPost
entries with mount and umount commands - Add bind mount volumes to the NFS shares pointing to the local mountpoint
This allows me to have the mounts only active when the container is running. And I can still have rootless podman containers. Seems to be working well in the limited testing I did yesterday.
Can you really? I’d love some pointers on that. I’ll try to look it up more, thanks