top of page

Run docker command without sudo

If you need to run docker command without sudo, then you need to add your user into docker group.

Create the docker group.

$ sudo groupadd docker

Add your user to the docker group.

$ sudo usermod -aG docker $USER

Log out and log back in so that your group membership is re-evaluated.

Verify that you can run docker commands without sudo.

$ docker run hello-world

WARNING

The docker group grants privileges equivalent to the root user. For details on how this impacts security in your system, see Docker Daemon Attack Surface.

Recent Posts

See All
Useful docker commands

To see the list of images docker images To see the list of running containers docker ps To see the list of all containers (both running...

 
 
 
Useful docker commands

To see the list of images docker images To see the list of running containers docker ps To see the list of all containers (both running...

 
 
 

Comments


Follow Me

  • LinkedIn
  • Twitter
  • Facebook
  • YouTube
  • Instagram

©2021 by Bilal Usean. Proudly created with Wix.com

bottom of page