Docker Inside LXC: Starting Container Process Caused ‘Apply Caps: Operation Not Permitted’

containersdockerlxcvirt-manager

I'm trying to run a Docker container inside an LXC container.
However doing so causes me to get the following error:

[root@DH-DockerLXC01 alex]# docker run fedora bash
docker: Error response from daemon: OCI runtime create failed: container_linux.go:337: starting container process caused "apply caps: operation not permitted": unknown.
ERRO[0001] error waiting for container: context canceled

I presume I need to set some configuration to be more permissive, but since I've created the LXC container with virt-manager I'm not sure where to start.

Note that the LXC container is using a chroot for storage, which AFAIK should allow docker to use full AUFS without any problems, but if I'm wrong please correct me.

Best Answer

For privileged LXC managed by Proxmox this solution helps:

lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:

Take care about security! Source: Running Docker on Proxmox