Skip to content

How to run Docker commands without sudo

Introduction

Setup your user account to run Docker commands without sudo. This worked for me within Ubuntu.

How To

  1. Setup your user account to be part of the docker group

    Run the following commands:

    # Open your terminal application
    sudo groupadd docker
    sudo usermod -aG docker $USER
    newgrp docker
  2. Restart your OS or VM

    Now you can run Docker commands without sudo.

Comments

    No comments found for this note.

    Join the discussion for this note on Github. Comments appear on this page instantly.

    Copyright 2021- Fiction Becomes Fact