Replies: 3 comments 1 reply
-
I can see that you are setting the relabeling to |
Beta Was this translation helpful? Give feedback.
-
That's an option, but from the standpoints of principles of least privilege, I would prefer not to. This isn't an issue when using podman directly (e.g. podman run, podman stop, podman start) since the container isn't removed (just stopped and started) and nothing is relabeled. The CI/CD pipeline for the software repository mirror in question takes a long time to run because each time the container is started with systemd it will relabel the entire repository. Reading https://github.com/containers/quadlet/blob/main/docs/ContainerSetup.md#robust-container-shutdown provides a bit more insight into why containers are removed when using systemd. At a first glance there doesn't seem to be anything to be done about this, but it would be a big improvement if podman was smarter about relabeling when using a (ps. is there anything that prevents podman from using an MCS label that's already been used on the system, other than just roughy 1/500000 chance? https://opensource.com/article/18/2/selinux-labels-container-runtimes) |
Beta Was this translation helpful? Give feedback.
-
It also seems that using
Only
|
Beta Was this translation helpful? Give feedback.
-
Example:
~/.config/containers/systemd/grafana.container:
MCS Label: c430,c714
MCS Label: c807,c1019
Is this intended? This can cause containers with volumes that contain a large amount of files to be very slow to restart.
AFAICS this is because the container is being removed each time and re-created.
The reason I start this discussion is because we have a software repository mirror (what type doesn't matter, just many files) and starting/restarting it takes over 5 minutes (it's not pulling the image).
Beta Was this translation helpful? Give feedback.
All reactions