[lxc-users] idmap, lxd and pylxde

brian mullan bmullan.mail at gmail.com
Wed Jan 25 13:36:23 UTC 2017


Witold

There is a tool called "fuidshift" you can use to shift the gid/uid for you.

http://manpages.ubuntu.com/manpages/xenial/man1/fuidshift.1.html

This previous lxc-users mailer thread can also give you some idea of its
use:

http://lxc-users.linuxcontainers.narkive.com/atlj58eG/proper-usage-of-fuidshift

fuidshift will be installed along with some other "tools" if you install
the lxd-tools package:

*sudo apt-get install lxd-tools*

Brian



> From: Witold Filipczyk <gglater62 at gmail.com>
> To: lxc-users at lists.linuxcontainers.org
> Cc:
> Date: Wed, 25 Jan 2017 10:06:41 +0100
> Subject: [lxc-users] idmap, lxd and pylxde
> Sorry for dumb questions.
> /etc/subuid looks like this
> root:100000:65536
> root:200000:65536
> root:300000:65536
> and so on
>
> /etc/subgid the same
>
> I want to create lxd containers so they have separate set of uids.
> How to do it with lxd commands and with pylxd?
>
> I tried:
> uids = 200000
> config = { 'limits.memory' : '1024MB', 'limits.cpu' : '1',
> 'name' : 'test', 'raw.id_map' : 'uid 0-65536 %d-%d\ngid 0-65536 %d-%d' %
> (uids, uids+65536, uids, uids+65536)}
> container = client.containers.create(config, wait=True)
>
> but result is that uids inside container's rootfs starts with 100000.
>
> Please, give some examples.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170125/1c0caa45/attachment.html>


More information about the lxc-users mailing list