Repository navigation
Compatibility
Hansehart edited this page Oct 31, 2026
·
3 revisions
Tested on these Docker hosts:
| Docker host | Requires |
|---|---|
| Ubuntu >= 22.04 | - |
| WSL2, Ubuntu >= 22.04 | AppArmor in the LSM list |
AppArmor on WSL2
The cage is started with an apparmor option, so WSL2 needs AppArmor in its LSM list. The stock WSL2 kernel supports it.
-
(Windows) Add the LSM list to
%UserProfile%\.wslconfig:[wsl2] kernelCommandLine = lsm=apparmor,bpf,integrity,landlock,loadpin,lockdown,safesetid,selinux,tomoyo,yama
-
(WSL) Open
/etc/fstab:sudo nano /etc/fstab
Add the
securityfsmount:none /sys/kernel/security securityfs defaults 0 0 -
(WSL) Reload systemd, so it picks up the new mount unit:
sudo systemctl daemon-reload
-
(Windows) Restart WSL2 in PowerShell or cmd, then open a new shell:
wsl --shutdown -
(WSL) Check the result, which lists the enabled LSMs in order:
cat /sys/kernel/security/lsm