Using Docker without sudo

Published
Last updated

You can use docker commands without sudo by creating a docker group and then adding yourself to said group.

sudo groupadd docker
sudo usermod -aG docker $USER

This is of course in the docs, but I usually forget this when I install docker on a new computer. You'll need to re-log after adding yourself to the group, and bounce the docker service if need be.

sudo service docker restart