I have a ubuntu 20.04 server running docker. Recently the default apparmor profile seems to have started enforcing a restriction on mount points in docker containers. So the containers write directly to the root filesystem rather than the mount.
Outside of docker I can navigate the mounts with no issues but when executing a shell in containers it is as if the mount points are not mounted.
I have narrowed this down to being caused by apparmor and disabling apparmor allows mounting and everything works as I would expect. The containers seem to be using the docker-default profile.
My question is: how do I enable mounting in docker container either on a global basis or on individual containers. I would rather not have to completely disable apparmor for this issue?