- Log into the container and create an empty directory, this will be the mount point
- Log out and stop the container.
- Open to your container's config file
- For regular LXC containers:
/var/lib/lxc/mycontainer/config
- For unprivileged LXC containers:
$HOME/.local/share/lxc/mycontainer/config
- For regular LXC containers:
- Add a new line above the
lxc.mount
directive, that follows the format below. Substitute proper paths as necessary:lxc.mount.entry = /path/to/folder/on/host /path/to/mount/point none bind 0 0
- Both of these paths are relative to the host machine.