-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Fixed incorrect Docker permission command structure (root user context) #499
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe README.md was updated to clarify the instructions for granting Jenkins and Ubuntu users permission to access the Docker daemon. The changes include separating the steps for switching to the root user and running usermod commands, with added explanatory comments and clearer code formatting. Changes
Estimated code review effort1 (~2 minutes) Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
README.md (2)
119-123: Specify the code-block language & drop the stray blank lineMarkdownlint (MD040) is flagging this fenced block because it lacks a language hint. Adding
bash(orshell) both fixes the lint error and enables syntax highlighting.
Also, the blank line after the comment is unnecessary.-``` -# Switch to root user - -sudo su - -``` +```bash +# Switch to root user +sudo su - +```
125-131: Same issue here – add language hint and consider droppingsudo su -altogether
- Lint / readability: add
bashto the fence.- UX / security: instead of opening a root shell with
sudo su -, you can execute the three commands directly withsudo, which is safer in copy-paste scenarios:-``` -# Now run the following as root - -usermod -aG docker jenkins -usermod -aG docker ubuntu -systemctl restart docker -``` +```bash +# Grant Docker group access and restart the daemon +sudo usermod -aG docker jenkins +sudo usermod -aG docker ubuntu +sudo systemctl restart docker +```(Users will still need to log out/in or run
newgrp dockerfor the group change to take effect.)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(1 hunks)
🪛 markdownlint-cli2 (0.17.2)
README.md
125-125: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
125-125: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
|
Hi Abhishek Sir, just cleaned up the Docker group permission steps. Let me know if any changes are needed — happy to adjust. |
The original code block merged
sudo su -withusermodcommands as if they could all run from the regular shell, which isn't correct.sudo su -should be run first to switch to root.usermod -aG docker <user>andsystemctl restart dockermust be run as root after switching.This improves clarity and avoids confusion for anyone following the setup guide.
Thanks for the great repo!
Summary by CodeRabbit