16.04 – How to fix "docker: error response from daemon: cgroups: cgroup mount destination can not be found: unknown" fixes on `docker run`?


I have Ubuntu 16.04.6 LTS installed.

Previously, I installed Docker from its repository as docker.io Package.

Yesterday I installed LXC with LXD and I assume that they have a coexistence problem with Docker

Well, when I try to start Docker Container with docker run I get an error:

docker: Error response from daemon: cgroups: cannot find cgroup mount destination: unknown.

How can I fix this problem when starting Docker containers?
If possible, suggest a solution with Docker and LXC / LXD installed at the same time.


Some debug information:

$ mount | grep cgroup
tmpfs on /sys/fs/cgroup type tmpfs (rw,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,clone_children)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event,release_agent=/run/cgmanager/agents/cgm-release-agent.perf_event)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids,release_agent=/run/cgmanager/agents/cgm-release-agent.pids)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb,release_agent=/run/cgmanager/agents/cgm-release-agent.hugetlb)

$ dpkg -l | grep -E "containerd|docker|lxc|lxd|cgroup"
ii  cgmanager                                     0.39-2ubuntu5                                   amd64        Central cgroup manager daemon
ii  cgroup-lite                                   1.11                                            all          Light-weight package to set up cgroups at system boot
ii  containerd                                    1.2.6-0ubuntu1~16.04.3                          amd64        daemon to control runC
ii  docker.io                                     18.09.7-0ubuntu1~16.04.5                        amd64        Linux container runtime
ii  libcgmanager0:amd64                           0.39-2ubuntu5                                   amd64        Central cgroup manager daemon (client library)
ii  liblxc1                                       2.0.11-0ubuntu1~16.04.3                         amd64        Linux Containers userspace tools (library)
ii  libpam-cgfs                                   2.0.8-0ubuntu1~16.04.2                          amd64        PAM module for managing cgroups for LXC
ii  lxc-common                                    2.0.11-0ubuntu1~16.04.3                         amd64        Linux Containers userspace tools (common tools)
ii  lxc-templates                                 2.0.11-0ubuntu1~16.04.3                         amd64        Linux Containers userspace tools (templates)
ii  lxc1                                          2.0.11-0ubuntu1~16.04.3                         amd64        Linux Containers userspace tools
ii  lxcfs                                         2.0.8-0ubuntu1~16.04.2                          amd64        FUSE based filesystem for LXC
ii  lxd                                           2.0.11-0ubuntu1~16.04.4                         amd64        Container hypervisor based on LXC - daemon
ii  lxd-client                                    2.0.11-0ubuntu1~16.04.4                         amd64        Container hypervisor based on LXC - client
ii  python3-lxc                                   2.0.11-0ubuntu1~16.04.3                         amd64        Linux Containers userspace tools (Python 3.x bindings)