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 <gglate...@gmail.com>
> To: lxc-users@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.
>
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to