metabrainz / musicbrainz-docker

Docker Compose project for the MusicBrainz Server with replication, search, and development setup
https://musicbrainz.org/doc/MusicBrainz_Server/Setup
297 stars 75 forks source link

Using sudo to run Docker commands in docs #241

Closed bitplane closed 1 year ago

bitplane commented 1 year ago

There's no need to do this as long as your user is in the right group (log out and in again after being added)

yvanzo commented 1 year ago

Thank you, that’s correct but it isn’t required to have your user in such group either, and sudo is more often installed.

Multiple ways of running Docker are supported in both docs and scripts; See admin/lib/common.inc.bash. It is less efforts for users to optionally skip sudo when reading the docs than to mandatorily have to add it if it was missing from the docs.

bitplane commented 1 year ago

Fair enough. I was messing with the data and it just seemed odd and kinda reckless to elevate commands to root without good reason. Kinda like using a chainsaw to open a door; it works but you should probably try your key first.

yvanzo commented 1 year ago

Both allow privilege escalation; See https://www.hackingarticles.in/docker-privilege-escalation/. sudoers can be restricted to selected commands and parameters, not docker group.