add docker user to sudo group code example Example: how to add docker to sudo group sudo groupadd docker sudo usermod -aG docker $USER