I’ve been really struggling the past few months with a bunch of issues with running nested containers (Docker in Incus), which have all eventually come back to AppArmor 4 being the cause. It seems to have adopted much stricter policies that are getting in the way of activities that were previously fine.
blocking of bwrap namespaces being created when running SteamRT3 sniper (this happens both in and out of Docker)
most recently, unix-chkpwd preventing root in a Docker container from su-ing to another user
I’ve seen some other issues posted over the last few months, but solutions there don’t either resolve the issue or cause other issues (such as making AppArmor unconfined stopping the Docker daemon from starting).
Experimenting with a different approach of just placing certain profiles in complain mode, I’ve now encountered another issue that is closer to being an Incus/LXC issue:
$ aa-complain docker-default
ERROR: Conflicting profiles for /usr/bin/lxc-start defined in two files:
- /etc/apparmor.d/usr.bin.lxc-start
- /etc/apparmor.d/usr.bin.lxc-copy
Any idea why there are conflicting profiles, and how to resolve?
I have to say that those two files don’t exist on my incus systems, so I think you can use incus without them. I found them inside a container where liblxc-common is installed (I’m not sure why):
If those files did come from liblxc-common, and are treated as “configuration” files so they hang around after uninstalling the package, then you can purge the package to get rid of them: