I am able to successfully install docker and run some containers inside of a container created by LXD. How can I do the same if just using LXC? (It would be a large project to migrate to LXD at this time for me)
The docker.io package installs fine, but there are errors when pulling an image.
root@xen:/# docker pull busybox Using default tag: latest latest: Pulling from library/busybox 67a0688b88df: Extracting [==================================================>] 722.8 kB/722.8 kB failed to register layer: ApplyLayer exit status 1 stdout: stderr: permission denied root@xen:/# journalctl -u docker No journal files were found. -- No entries --
In the lxc.conf I have the following line to allow container nesting.
lxc.include = /usr/share/lxc/config/nesting.conf
From dmesg I see the apparmor error, do I need to allow some additional mounting for docker to work properly? Does LXD add this automatically when passing
-c security.nesting=true ?
[92809.594473] audit: type=1400 audit(1516748852.652:262): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxc-container-default-with-nesting" name="/" pid=5974 comm="exe" flags="rw, rprivate"
I am using LXC version 2.0.8