Can't run docker inside lxc Ubuntu 14.04 container

lxc container is created with:

$ lxc launch ubuntu:14.04 test \
-c security.privileged=true \
-c security.nesting=true \
-c linux.kernel_modules=ip_tables,ip6_tables,netlink_diag,nf_nat,overlay

Docker is installed using this source

$ cat /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list
deb [arch=amd64] trusty stable

Package information:

$ dpkg -l | grep docker
ii  docker-ce                            18.06.1~ce~3-0~ubuntu                                amd64        Docker: the open-source application container engine

Docker error:

$ docker run hello-world
docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.
ERRO[0000] error waiting for container: context canceled

How can I fix this so that nested docker containers work using LXC and Ubuntu 14.04?

I’d recommend simply not using Ubuntu 14.04 for this.

The error is related to cgroups and likely explained by Ubuntu 14.04 not mounting any cgroups by default and otherwise having a different cgroup layout than what’s typical on systemd based systems these days.

The cgroup-lite package may get you some of the way there, but I’m not sure it’ll be good enough for Docker to be happy.

You have no idea how much I wish this was an option. Maybe in April at end of life but more likely that is when the move to 18.04 will begin in earnest.

No luck there but thanks for trying.