Chapter 11
- The
machinectl
command does not allow administrators to change the SELinux type of the running containers. This results in all containers running by default under an unconfined domain, whereas we want confined domains to be used—preferably even with sVirt support so that containers cannot influence one another either. - When a container is launched with a location mapping, we should use the
:Z
option (in case of a private mapping) or the:z
option (in case of a shared mapping) to ensure that the resources are relabeled with a container-accessible SELinux type:# podman run -dit --name postgresql-test -v /srv/db/postgresql-test:/bitnami/postgresql:Z -p 5432:5432 postgresql
Without this option, the label of the resource remains untouched, which generally means that the container runtime cannot access the resource at all.
- We can use the
udica
application to generate a custom policy. The application uses the information that is provided from apodman inspect
...