[lxc-users] creating device nodes in unprivileged containers?

Tomasz Chmielewski mangoo at wpkg.org
Wed Jul 1 13:46:27 UTC 2015


On 2015-07-01 18:08, Fajar A. Nugraha wrote:
> On Wed, Jul 1, 2015 at 3:38 PM, Tomasz Chmielewski <mangoo at wpkg.org> 
> wrote:
>> Really not possible? How do people run debootstrap, pbuilder? These 
>> tools
> 
> Not as root inside an unprivileged container
> 
>> are often parts of build systems, am I really the first one to try to 
>> run
>> them in LXC?
> 
> pbuilder with fakeroot should work

Unfortunately it doesn't:

tomasz.staff.com at build01:~$ fakeroot /bin/bash
root at build01:~# pbuilder-dist trusty i386 create
(...)
I: running debootstrap
/usr/sbin/debootstrap
mknod: '/var/cache/pbuilder/build/6474/./test-dev-null': Operation not 
permitted
E: Cannot install into target '/var/cache/pbuilder/build/6474/.' mounted 
with noexec or nodev
E: debootstrap failed
W: Aborting with an error


https://pbuilder.alioth.debian.org/#nonrootchroot

Even when using the fakerooting method, pbuilder will run with root 
privilege when it is required. For example, when installing packages to 
the chroot, pbuilder will run under root privileg

-- 
Tomasz Chmielewski
http://wpkg.org



More information about the lxc-users mailing list