I was attempting to run Docker within a LXC container on a host running Ubuntu 20.04.
I kept getting the following error when attempting to run a container, in spite of adding:
lxc.apparmor.profile = unconfined
.. to my LXC container’s config file:
$ docker run -ti ubuntu:latest /bin/bash
docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: running `/usr/sbin/apparmor_parser apparmor_parser -Kr /var/lib/docker/tmp/docker-default752380479` failed with output: apparmor_parser: Unable to replace "docker-default". Permission denied; attempted to load a profile while confined?
error: exit status 243.
ERRO[0000] error waiting for container: context canceled
The easiest solution for me was to simply uninstall apparmor from my LXC container’s (not the host’s) operating system:
$ sudo apt-get remove apparmor
Recent Comments