Run Docker commands without sudor

46 阅读1分钟
  1. Add the docker group if it doesn’t already existPermalink $ sudo groupadd docker
  2. Add the connected user $USER to the docker groupPermalink Optionally change the username to match your preferred user.

sudogpasswdasudo gpasswd -aUSER docker IMPORTANT: Log out and log back in so that your group membership is re-evaluated.

  1. Restart the docker daemonPermalink $ sudo service docker restart If you are on Ubuntu 14.04-15.10, use docker.io instead:

$ sudo service docker.io restart sudo reboot