Last Updated: September 27, 2021
·
7.17K
· chrismckinnel

Run Docker commands without sudo

Create a docker group:

sudo groupadd docker

Add your user to the docker group:

sudo gpasswd -a USERNAME docker

Log out and back in, then restart the Docker daemon.

# Ubuntu
sudo service docker resart

# Arch
sudo systemctl docker restart

Now you can run docker commands as your user!