Docker in LXC hangs after LXC Startup

felixheilig

Member
Jul 6, 2021
14
0
6
27
Hey everyone,

First and foremost, I want to acknowledge that running Docker inside an LXC container is not recommended and not officially supported. I'm aware of this fact, but I'm hoping someone might have some insights or suggestions to offer.

The Docker setup within an LXC container does work for me, but there's a peculiar issue I'm experiencing. After starting the LXC container, all Docker commands freeze for approximately 3 to 4 minutes. Once this initial delay is over, everything works perfectly without any further problems or hang-ups.


Bash:
arch: amd64

cores: 2

features: fuse=1,keyctl=1,nesting=1

hostname: unifi

memory: 5048

nameserver: 192.168.30.1

net0: name=eth0,bridge=vmbr0,gw=192.168.178.1,hwaddr=FE:F1:82:E9:CD:B2,ip=192.168.178.31/24,type=veth

net1: name=eth35,bridge=vmbr35,gw=192.168.35.1,hwaddr=5A:88:39:74:EA:8E,ip=192.168.35.31/24,type=veth

onboot: 0

ostype: debian

rootfs: local-zfs:subvol-118-disk-0,size=40G

swap: 512

tags:

unprivileged: 1
 
Hello,

Your container is unprivileged.
It may be a cause for Docker freezing for a while trying to execute startup tasks that would require more privileges than the container has, before timeouting / realising it doesn't need such privileges.

You probably won't see that kind of problem if installing in a KVM host.


Best regards,

--
G. Delanoy