Skip to content

Latest commit

Β 

History

History
69 lines (50 loc) Β· 1.21 KB

File metadata and controls

69 lines (50 loc) Β· 1.21 KB

πŸ“¦ docker 🐳

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io

πŸƒ We will need to run docker daemon, to run it you can execute this

systemctl start docker

But if you want to start it every time you restart your computer

sudo systemctl enable docker

And disabled with

sudo systemctl disable docker

βœ”οΈ Test if it's working

docker run hello-world

Remove Sudo for docker

πŸ”— https://askubuntu.com/questions/1165877/is-it-possible-to-use-docker-without-sudo

sudo groupadd docker
sudo usermod -aG docker $USER

πŸ” πŸ’» Restart computer or re-start docker daemon

❌ If not working

sudo chown "$USER":"$USER" /home/"$USER"/.docker -R sudo chmod g+rwx "$HOME/.docker" -R