[lxc-users] Using docker *and* nfs in lxd?

Fajar A. Nugraha list at fajar.net
Fri Apr 29 18:15:14 UTC 2016


On Sat, Apr 30, 2016 at 12:43 AM, Dan Kegel <dank at kegel.com> wrote:
> So lxc is a better choice than lxd when you want to export nfs
> filesystems from a container,
> but the real answer is "don't do that"?
>
> I might be able to split the nfs serving part out of this app, but
> it's not a great sign that right out of the gate I'm hitting a leaky
> abstraction.
>
> The app also needs good OpenGL, and that's probably the next roadblock
> I'll be running into.

I use this simple criterias:
- if it runs "simple" applications (e.g. php + mysql, or postgres),
then the default lxd unpriv container should work
- if it requires fuse (e.g. xrdp, with file copy-paste support), then
you need a privileged container (default apparmor profile works)
- if it requires anything that touches the kernel (mount, module
loading, etc) then you'd probably best using other virtualization
solutions

Your best bet would probably to try userland nfs server, e.g.
https://launchpad.net/~gluster/+archive/ubuntu/nfs-ganesha?field.series_filter=xenial

This might also be relevant (at least the "-r" part):
https://openvz.org/NFS_server_inside_container#User-space_NFS_server

-- 
Fajar


More information about the lxc-users mailing list