-
Notifications
You must be signed in to change notification settings - Fork 50
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
Remove 'sudo' prefix from helpful message about fetching logs #248
Conversation
- Whether sudo is required or not is related to the docker setup on the user's machine, and not related to the docker command used to retrieve the logs itself.
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.
https://docs.docker.com/get-started/#setup
Note: You may need to add your user to the docker group in order to call this command without sudo. Read more
Looks like the docker docs now officially support adding docker as user.
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.
There is no harm to add sudo
even if its running as privileged user. Most of the time, current user is not added to docker
user. Current approach is safe for copy/paste.
Using sudo is not good practice. Any program that is known to be safe can be run as root, but this is discouraged for all the usual reasons (encourages users to solve permission issues by simply running as root).
This was true in the early days - the support to run docker without root has been around for more than 2 years by now. The default Ubuntu/Linux install instructions for Docker specify how to run docker without root.
This is irrelevant. I think what you meant is that it is convenient. However, no convenience is lost if the user just did the post install steps - https://docs.docker.com/engine/installation/linux/linux-postinstall/ |
Direct root account usage is disabled long time ago. See https://help.ubuntu.com/community/RootSudo
Note that ubuntu doesn't add any user into docker group by default. Steps https://docs.docker.com/engine/installation/linux/linux-postinstall/ is done separately after
|
I don't understand. This is an unrelated point. I didn't say anything about logging in as root. To clarify my earlier point, a sudo user (e.g. the owner of a laptop with ubuntu installed) can run any program with root privileges by prefixing the command with "sudo". Though it is safe to run many programs as root (again, by prefixing the command with sudo), it is discouraged, as it encourages insecure practices such as solving permissions issues by using the sudo hammer.
Yes, again obviously docker does not do this automatically as it is not inherently safe to run docker with root privileges (by adding it to docker group). This is why it is left to the user to decide their own level of tolerance to run untrusted programs. It is the same with mint. We do not guarantee it is safe - we should not recommend users to run it as root - especially when it is not strictly required. |
the user's machine, and not related to the docker command used to
retrieve the logs itself.