distrobox
distrobox copied to clipboard
[Discussion] Consider unsharing ~/.cache/fontconfig
Is your feature request related to a problem? Please describe.
fontconfig
caches are not compatible across distributions. If I try to update the font cache inside the container to surface my custom fonts, with fc-cache -fv
, it'll complain about the cache being invalid and it has to be recreated, but doing so will corrupt the font cache for the host system.
My host system is Fedora Silverblue, the container is running Arch Linux.
Describe the solution you'd like
The ~/.cache/fontconfig
directory should be separate from the host cache directory. An empty directory on container creation should be fine. Sadly I don't think it's possible to change volume mounts for a podman container after it's been created.
In general, it would be nice to have a way to share and unshare directories from the host at will. I'm not sure if podman allows that at all.
See also:
- https://github.com/containers/toolbox/issues/762
In general, it would be nice to have a way to share and unshare directories from the host at will. I'm not sure if podman allows that at all.
Yea sadly podman/docker don't work this way, so probably it's something that needs to be thought and taken care in the init
?
The ~/.cache/fontconfig directory should be separate from the host cache directory. An empty directory on container creation should be fine. Sadly I don't think it's possible to change volume mounts for a podman container after it's been created.
This indeed could be done in the init to make it "runtime" instead of static, but as debarshiray rightfully said, this need to be thought through, because it's easy to do it wrong or do it in an unmaintainable way :smile:
I don't think this is a problem in practice. Being able to unshare directories would be nice, but ~/.cache/fontconfig ain't one of them.