-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Makefile: Mount . with --security-opt label=disable instead of using --privileged #15479
Makefile: Mount . with --security-opt label=disable instead of using --privileged #15479
Conversation
c285fcd
to
00b58e4
Compare
NO, You should not use :Z to relabel the users homedirectory every time this is done. The better fix is to just disable SELinux during the running of the container. --security-opt label=disabled. |
00b58e4
to
fbeb42b
Compare
Done, thanks for the suggestion! |
LGTM |
$(CURDIR) is mounted in podman as is which causes issues on systems with SELinux as then the container cannot read or write anything inside /src/. This has been worked around with the --privileged flag, but that's a rather brutal solution. Adding :Z is also suboptimal, as that requires a full relabeling after every run. Instead, we disable security labeling via `--security-opt label=disable` for this development container allowing us to run `make vendor-in-container` unprivileged. Signed-off-by: Dan Čermák <[email protected]>
fbeb42b
to
dcb4d43
Compare
Daniel J Walsh ***@***.***> writes:
LGTM
But can you fix the commit message.
Yes, should be fixed now.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/hold
Thanks, @dcermak !
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dcermak, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
$(CURDIR)
is mounted in podman without:Z
which causes issues on systems with SELinux as then the container cannot read or write anything inside/src/
. This has been worked around with the--privileged
flag, but that's a rather brutal solution. Instead, adding the proper SELinux sharing setting fixes the problem and allowsmake vendor-in-container
to run unprivileged.Does this PR introduce a user-facing change?