2

I'm trying to install and run docker inside a LXC container (through LXD).

The container is created using lxc launch ubuntu:16.04 democontainer, and after I login and install docker (v1.12.3) it always fails in starting docker with the error:

FATA[0001] Error starting daemon: Devices cgroup isn't mounted

I have already tried to add this to the file /var/lib/lxc/democontainer/config

lxc.aa_profile = unconfined
lxc.cap.drop =

(and also lxc.mount.auto = cgroup) as stated here, but the result is the same. What may be the problem?

The host system is a Ubuntu 14.04.5 (kernel 4.2.0-42-generic) and the container an Ubuntu 16.04.1. Docker works fine in the host system (v 1.13.0)

Salem
  • 19,864
  • 6
  • 65
  • 90

1 Answers1

1

This works on 16.04 now. See the following q/a for more details:

What is the workaround for LXD-nested pivileged docker (/dev/.lxc/proc/ error)?

lxc launch ubuntu-daily:xenial xenial
lxc config set xenial security.nesting true
lxc exec xenial snap install docker
lxc exec xenial docker run ubuntu ls
dpb
  • 7,209