<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 10, 2017 at 1:33 PM, T.C 吳天健 <span dir="ltr"><<a href="mailto:tcwu2005@gmail.com" target="_blank">tcwu2005@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span style="color:rgb(136,136,136);font-size:14px">Fajar and Andrey,</span><br><div><span style="color:rgb(136,136,136);font-size:14px"><br></span></div><div><font color="#888888"><span style="font-size:14px">I run lxc-1.0 on embedded system and I don't have lxd on that platform. (i.e. I cross-compile lxc-1.0 from scratch no prebuild package available).  And yes I run container with root privilege .</span></font></div></div></blockquote><div><br></div><div>I highly suggest you invest some time to port lxd there. It'd make some things a lot easier.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><font color="#888888"><span style="font-size:14px"><br></span></font></div><div><font color="#888888"><span style="font-size:14px">Can I have your mentioned features "</span></font><span style="font-size:14px">use separate u/gid range for each container" and "limits which device nodes (block and char) allowed in the container" without existence of lxd?</span></div><div><span style="font-size:14px"><br></span></div></div></blockquote><div><br></div><div>Without LXD? Best docs I can point you to are:</div><div>- <a href="https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html">https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html</a> (for example, find "lxc.cgroup.devices.allow" and "UID MAPPINGS" there)<br>- <a href="https://github.com/lxc/lxc/tree/master/doc">https://github.com/lxc/lxc/tree/master/doc</a></div><div>- <a href="https://stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/">https://stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/</a></div><div>- <a href="https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-unpriv">https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-unpriv</a></div><div><br></div><div>A little note about the last two, they guide you to create user-owned unpriv containers. It's usually MUCH easier to manage (including setting autostart behavior) root-owned unpriv containers (which is basically what lxd does). root-owned unpriv containers are similar to privileged container, except that:<br>- it has uid mappings configurations</div><div>- the files in rootfs has its u/gid shifted (e.g. with fuidshift)<br><br><br></div><div>Again, the process is MUCH simpler if you have lxd (e.g. look for "security.idmap.isolated" in <a href="https://github.com/lxc/lxd/blob/master/doc/containers.md">https://github.com/lxc/lxd/blob/master/doc/containers.md</a>)</div><div><br></div><div>-- </div><div>Fajar</div></div></div></div>