Docker without sudo

  • Add the docker group if it doesn’t already exist:
    sudo groupadd docker
    
  • Add the connected user “$USER” to the docker group. Change the user name to match your preferred user if you do not want to use your current user:
    sudo gpasswd -a $USER docker
    
  • Either do a newgrp docker or log out/in to activate the changes to groups.
  • You can use
        docker ps -a
    

    to check if you can run docker without sudo.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s