[lxc-users] LXD - bind mount inside container

Fajar A. Nugraha list at fajar.net
Tue Jun 14 11:13:53 UTC 2016


On Tue, Jun 14, 2016 at 5:47 PM, Ron Kelley <rkelleyrtp at gmail.com> wrote:
>
> Greetings,
>
> Looking to setup a bind mount inside a CentOS-6 container for ~user-a/WWW pointing to /var/www/html.  However, each time I run “bind —mount /home/user-a/www /var/www/html” I get a read-only error message and the bind mount is not created.  This works just fine inside a “normal” VM.
>
> Any pointers?
>

https://github.com/lxc/lxd/blob/master/doc/configuration.md

stop your container, set security.nesting (and probably
security.privileged) to true, start it again.

Note that it pretty much negates some of the additional security
protections present in lxd, so make sure you trust your container
admin (e.g. you use it yourself, not for a shared hosting setup).

-- 
Fajar


More information about the lxc-users mailing list