Install docker on Debian 9 and run docker without sudo

Install Docker on a Debian 9 machine

$ sudo apt-get update
$ sudo apt-get install \
     apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \
     software-properties-common
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce
$ sudo gpasswd -a $USER docker

$ newgrp docker

Links

  • https://docs.docker.com/install/linux/docker-ce/debian/#upgrade-docker-after-using-the-convenience-script
  • https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo
%d Bloggern gefällt das: