Depends on the order of your config, it's sequential, so you could have: lxc.mount.entry = foo lxc.mount = /var/lib/lxc/blah/fstab lxc.mount.entry = bar
and it'd first process foo, then process anything in fstab and then process bar. On Sat, Dec 20, 2014 at 10:25:19PM +0100, BB wrote: > Thanks for the answer. I was not sure if there is some subtle difference > between alternatives 1) and 2). > > Is 1) applied before 2) or vice versa? > > Best regards, > > BB > > On Sat, Dec 20, 2014 at 9:10 PM, Stéphane Graber <[email protected]> > wrote: > > > On Sat, Dec 20, 2014 at 09:00:50PM +0100, BB wrote: > > > Hi, > > > > > > is there any significant difference between the configuration of mounts > > in > > > the container's fstab file versus lxc.mount.entry entries in the > > > container's config file? > > > I am currently using only the former method. > > > > > > Best regards, > > > > > > BB > > > > So there are at least three ways you can handle mounts in a container: > > 1) Use lxc.mount.entry in the container's config > > 2) Use lxc.mount pointing to a file on the host > > 3) Use /etc/fstab inside the container's rootfs > > > > 1) and 2) are essentially identical as any entry in the fstab-like file > > pointed to by lxc.mount is parsed using the same parse as > > lxc.mount.entry. > > > > 3) Is different in that it's the parser in the rootfs which will process > > this and do any required mounts. In this case, your mounts may be > > rejected due to apparmor, selinux, seccomp or user namespaces > > restrictions and also will not allow you to bind-mount resources from > > the host. > > > > -- > > Stéphane Graber > > Ubuntu developer > > http://www.ubuntu.com > > > > _______________________________________________ > > lxc-users mailing list > > [email protected] > > http://lists.linuxcontainers.org/listinfo/lxc-users > > > _______________________________________________ > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: Digital signature
_______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
