Recently, we were playing with a chroot
ed environment using mock
.
We wanted to give access to the chroot
ed environment to a folder that was part of the host machine but not part of its virtual environment.
To do so, we mounted the host machine folder on a new folder inside the chroot
ed area by executing the following on the host machine
#/var/lib/mock/fedora-25-x86_64/root/ is the root of the chrooted environment mkdir /var/lib/mock/fedora-25-x86_64/root/cool_stuff/; #/home/george/KickStart/cool_stuff/ is the folder which we want the chrooted environment to have access to sudo mount --bind /home/george/KickStart/cool_stuff/ /var/lib/mock/fedora-25-x86_64/root/cool_stuff/;
This post is also available in: Αγγλικα