distrobox
distrobox copied to clipboard
[Suggestion]Possibility to mount a volume from inside the container after been created.
Hello,
from the documentation
Mount additional volumes in a distrobox distrobox create supports the use of the --volume flag, as specified in the usage HERE Simply use: distrobox create --name test --image your-chosen-image:tag --volume /your/custom/volume/path
I see that I can mount a volume only at the time of the creation of the container.
Is it possible to mount a volume after the container has been created? I couldn't find an answer to this question. If the answer is not, it would be great to have this possibility. If the answer is yes, could this be explained in the useful_tips page?
Thank you.
I have maybe to specify that I'm using an image for which something strange happens:
[me@Resolve_Centos_7_root ~]$ sudo mount | grep sda
/dev/sda1 on /run/host/mnt/dskw type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
but:
[mar@Resolve_Centos_7_root ~]$ ls -l /mnt/dskw/
total 0
while with all the others containers I have they see files and dirs inside such volume, and when I do
$ sudo mount | grep sda
in them, I get exactly the same result, that is the volume is successfully mounted and in the same way.
The feature request is still valid though, if volumes cannot be mounted after the container's creation.
Actually I realize now that the problem persists. even with the command:
distrobox create --root --name Resolve_Centos_7_root --image quay.io/centos/centos:7 --volume /mnt/dskw/
Unfortunately I cannot use a different version of Cent-OS, because it's the only distro supported by the software I need.
Maybe I should make a separate question for this, s.v.p. let me know.
I have no idea if this could be related to the enhancement asked in #1019 as I don't understand what for /nix is really meant there.
The mounts are available on host's /run/host/mnt/