Issues with Alpine containers /dev (ref xorg) on LXD

Hoping to get some help with a filesystem issue. Running an almost-default LXD on Ubuntu 18.04 (on AWS). Google has not been helpful unfortunately.

Spun up an Alpine 3.12 container, and am now trying to get it configured with a desktop environment.
I’ve gone though # setup-alpine. Trying now to run # setup-xorg-base but am faced with the following:

# setup-xorg-base
OK: 119 MiB in 145 packages
OK: 119 MiB in 145 packages
 * Udev requires /dev to be a mounted devtmpfs.
 * Please reconfigure your system.
 * ERROR: udev failed to start
 * WARNING: udev-postmount has already been started
 * WARNING: udev-trigger has already been started
 * WARNING: udev-settle has already been started

Here is the output of mount:

# mount
default/containers/david-browser on / type zfs (rw,xattr,posixacl)
none on /dev type tmpfs (rw,relatime,size=492k,mode=755,uid=1000000,gid=1000000)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,relatime)
udev on /dev/fuse type devtmpfs (rw,nosuid,relatime,size=8183656k,nr_inodes=2045914,mode=755)
udev on /dev/net/tun type devtmpfs (rw,nosuid,relatime,size=8183656k,nr_inodes=2045914,mode=755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys/kernel/tracing type sysfs (rw,nosuid,nodev,noexec,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /dev/lxd type tmpfs (rw,relatime,size=100k,mode=755)
tmpfs on /dev/.lxd-mounts type tmpfs (rw,relatime,size=100k,mode=711)
lxcfs on /proc/cpuinfo type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/diskstats type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/loadavg type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/meminfo type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/stat type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/swaps type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /proc/uptime type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
lxcfs on /sys/devices/system/cpu/online type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
udev on /dev/full type devtmpfs (rw,nosuid,relatime,size=8183656k,nr_inodes=2045914,mode=755)
udev on /dev/null type devtmpfs (rw,nosuid,relatime,size=8183656k,nr_inodes=2045914,mode=755)
udev on /dev/random type devtmpfs (rw,nosuid,relatime,size=8183656k,nr_inodes=2045914,mode=755)
udev on /dev/tty type devtmpfs (rw,nosuid,relatime,size=8183656k,nr_inodes=2045914,mode=755)
udev on /dev/urandom type devtmpfs (rw,nosuid,relatime,size=8183656k,nr_inodes=2045914,mode=755)
udev on /dev/zero type devtmpfs (rw,nosuid,relatime,size=8183656k,nr_inodes=2045914,mode=755)
devpts on /dev/console type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
none on /proc/sys/kernel/random/boot_id type tmpfs (ro,nosuid,nodev,noexec,relatime,size=492k,mode=755,uid=1000000,gid=1000000)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=1000005,mode=620,ptmxmode=666,max=1024)
devpts on /dev/ptmx type devpts (rw,nosuid,noexec,relatime,gid=1000005,mode=620,ptmxmode=666,max=1024)
tmpfs on /run type tmpfs (rw,nodev,relatime,size=1639608k,mode=755,uid=1000000,gid=1000000)

Any assist is highly appreciated!

1 Like

/dev cannot be a devtmpfs in containers as devtmpfs isn’t container aware at all.
Exposing that filesystem would be a massive security issue and is why the kernel doesn’t allow it.

1 Like

Fair enough, then!