[lxc-users] idmap, lxd and pylxde
Witold Filipczyk
gglater62 at gmail.com
Wed Jan 25 15:12:34 UTC 2017
On Wed, Jan 25, 2017 at 08:36:23AM -0500, brian mullan wrote:
> 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*
Thanks for the reply, but must be some simpler method.
In lxc configuration it was:
lxc.id_map = u 0 200000 65536
lxc.id_map = g 0 200000 65536
How to express it in lxd and pylxd?
>
> 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.
> >
More information about the lxc-users
mailing list