Skip to main content

Using Docker without sudo

·1 min

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
Neal Fennimore
Author
Neal Fennimore
Seasoned engineer with 15+ years delivering secure, automated CI/CD pipelines, cloud-native security controls, and compliance-by-design solutions for government and enterprise environments. Proven ability to embed SAST/DAST, SIEM, and Zero-Trust architectures into large-scale platforms while driving cost-effective automation and continuous monitoring. Holds a Master’s in Cybersecurity and multiple industry certifications.