Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SELinux systems #255

Open
wants to merge 1 commit into
base: feat/dnpm-dip
Choose a base branch
from

Conversation

YtvwlD
Copy link

@YtvwlD YtvwlD commented Dec 12, 2024

This is the other half of the changes we talked about last week: Since we're running the new VM with RHEL, we need some adjustments for SELinux. These are ignored on systems without it.

Adding Z allows this container (and only this one) to access the bind mount. This seems to be only needed for files in /srv, because RHEL ships a special label for this folder.
This is also why /srv/docker/bridgehead/bridgehead can be run manually, but not from a systemd service.

We additionally had the slight problem that with Podman, /var/run/docker.sock, being a symlink to /var/run/podman/podman.sock, was owned by root:root. Changing this to root:docker worked, but I'm not quite sure where to put it in the existing scripts. (docker is the usual Docker cli.)

@Threated

@Threated
Copy link
Member

Thanks a lot for the PR ❤️
Which volumes need the Z flag I saw you only added it to volumes that point to /srv/docker/bridghead/* so I guess /etc/bridghead/* is fine?
Also in other projects we have mounts in /tmp/bridgehead/* and /var/cache/bridgehead/* (I also changed the dnpm docker volumes to be fs mounts to that dir today as it was requested by Martin in the other PR) I assume that is problematic as well?
I wonder if we can get away with just executing a few commands as root when running sudo ./bridgehead install <project> to fix all the SEL specialties without needing to remember to add the z flag to each volume or not being able to use docker secrets 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants