docs: add SELinux/RHEL notice to container quick start#466
Conversation
Users on RHEL, Fedora, and other SELinux-enforcing systems hit Permission denied and dubious ownership errors when following the Quick Start examples. The fix is documented in the Podman Rootless Mode section but there was no indication to look there. Added callouts to both README.md and CONTAINER.md Quick Start sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughQuick Start container examples in CONTAINER.md and README.md now append SELinux relabeling ChangesPodman SELinux volume mounts
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aegeiger
left a comment
There was a problem hiding this comment.
Instead of this comment I'd suggest editing the command itself. -v /path/to/repo:/repo:ro,Z -v ~/agentready-reports:/reports:Z
|
@aegeiger Good point, just worth noting that the :z / :Z flags only apply when SELinux is enabled and enforcing, and are simply ignored on systems without it. That's actually the reason I suggested linking to the relevant documentation section, it gives users the context to decide whether these options apply to their environment and Linux OS setup. |
|
@aviavraham on systems without SELinux this flag is silently ignored without harm, so IMHO we should advise everyone to run it. Tested on macOS. |
|
Agree, I will update the MR |
Per review feedback, add SELinux :Z labels directly to the podman run volume mounts. The flag is silently ignored on non-SELinux systems, making it safe as the default for all users. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CONTAINER.md`:
- Around line 16-17: Several remaining Podman bind-mount examples in
CONTAINER.md still omit SELinux mount labels and can fail for SELinux-enforcing
users; update every occurrence of the Podman bind-mount examples (the lines
using "podman run -v ..." and the earlier sample mounts like "-v
/path/to/repo:/repo" or "-v ~/agentready-reports:/reports") to append the
appropriate SELinux label (:z or :Z) consistent with the Quick Start fix, or add
a short note next to each Podman example explaining to use :z/:Z for SELinux,
ensuring all Podman run -v examples are updated consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: e305352d-41f0-4915-94ee-5fa73921c2ad
📒 Files selected for processing (2)
CONTAINER.mdREADME.md
| -v /path/to/repo:/repo:ro,Z \ | ||
| -v ~/agentready-reports:/reports:Z \ |
There was a problem hiding this comment.
Quick Start is fixed, but the same SELinux failure path still exists in other Podman examples.
Good change here. However, several later podman run -v ... examples in this same file still omit :z/:Z, so SELinux-enforcing users can still hit permission errors when following those sections. Please apply the same labeling strategy (or an explicit SELinux note) consistently across the remaining Podman bind-mount examples in CONTAINER.md to avoid repeated copy/paste failures.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CONTAINER.md` around lines 16 - 17, Several remaining Podman bind-mount
examples in CONTAINER.md still omit SELinux mount labels and can fail for
SELinux-enforcing users; update every occurrence of the Podman bind-mount
examples (the lines using "podman run -v ..." and the earlier sample mounts like
"-v /path/to/repo:/repo" or "-v ~/agentready-reports:/reports") to append the
appropriate SELinux label (:z or :Z) consistent with the Quick Start fix, or add
a short note next to each Podman example explaining to use :z/:Z for SELinux,
ensuring all Podman run -v examples are updated consistently.
📈 Test Coverage Report
Coverage calculated from unit tests only |
jwm4
left a comment
There was a problem hiding this comment.
Review by Bill Murdock (with assistance from Claude Code)
Verdict: Request changes
Good idea to make the Quick Start work out of the box on SELinux systems.
Inconsistent :z vs :Z casing
The PR adds uppercase :Z to the Quick Start examples, but the existing "Podman Rootless Mode" and "Troubleshooting: Permission denied" sections in CONTAINER.md use lowercase :z. The file also has a "Note on SELinux Labels" section explaining the difference between the two. Could you make sure the choice is intentional and consistent, or explain why the Quick Start should use a different variant than the rest of the file?
Other examples
Several other podman run -v examples in CONTAINER.md don't have either flag. Is there a reason the fix should be limited to Quick Start, or should it apply more broadly?
Summary
README.mdandCONTAINER.mdwarning RHEL/Fedora/SELinux users that the default commands will fail:zlabels,--userns=keep-id,GIT_CONFIG_*env vars)Context
Following the Quick Start container examples on a Fedora system with SELinux enforcing results in
Permission deniedanddubious ownershiperrors. The fix already exists in the Podman Rootless Mode section, but there's no indication in the Quick Start to look there — users hit a wall with no guidance.Test plan
#podman-rootless-moderesolves correctly in CONTAINER.mdCONTAINER.md#podman-rootless-moderesolves from README.md🤖 Generated with Claude Code
Summary by CodeRabbit