AppArmor (Application Armor) is a Linux security module that protects an operating system and its applications from security threats. To use it, a system administrator associates an AppArmor security profile with each program. Docker expects to find an AppArmor policy loaded and enforced. Check default profiles with:
# sudo apparmor_status
To use docker default profile on a container, run:
$ docker run --rm -it --name test-container --security-opt apparmor=docker-default image-name
You disable it using the commands:
--security-opt apparmor=unconfined
With the docker run commands.
To disable apparmor service, use:
# systemctl stop apparmor && systemctl disable apparmor
For Ubuntu 14. Use:
# service apparmor stop
# update-rc.d -f apparmor remove
It’s recommended to set working profiles for Docker apparmor than disabling it, especially for production setups.
Check this awesome google document on Securing Containers with AppArmor.
https://cloud.google.com/container-optimized-os/docs/how-to/secure-apparmor
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…