u/SpaceExplorers-

▲ 7 r/docker

ELI5 Can selinux policies be applied inside a docker container?

My understanding is that you can apply policies from the host to the container to protect the host from the container and protect other containers. However, it is not possible to run selinux inside a docker container. Is that correct?

Questions:

  1. It is not possible to enforce selinux policies inside a container. Is that correct?

  2. getenforce/sestatus will always return disabled inside a container. There is no way to change to permissive or enforced mode.

Please, do not just give me an answer from AI. It seems like AI returns slightly different answers each time. I would appreciate it if someone can explain this! Thank you :)

reddit.com
u/SpaceExplorers- — 9 days ago