DEV Community

Cover image for #006 Install Docker
Omar
Omar

Posted on

#006 Install Docker

Introduction

this is part 6 from the journey it's a long journey(360 day) so go please check previous parts , and if you need to walk in the journey with me please make sure to follow because I may post more than once in 1 Day but surely I will post daily at least one 😍.

And I will cover lot of tools as we move on.


Install on Debian

Why Debian?

I use mx-linux 19.2 it's an debian based distro , I will post reference for Windows / macOs / Ubuntu (Ubuntu is Debian based also please some one test same steps in Ubuntu and comment if also work on it)


Installation

  • if you are already root user no need to use sudo
  1. we need to uninstall any old version
sudo apt-get remove docker docker-engine docker.io containerd runc
Enter fullscreen mode Exit fullscreen mode
  1. we need to update the system
sudo apt-get update
Enter fullscreen mode Exit fullscreen mode
  1. we need to install the tools (some of them are already built-in with Debian so the installer will skip them
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Enter fullscreen mode Exit fullscreen mode
  1. Add Docker official GPG key
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Enter fullscreen mode Exit fullscreen mode
  1. to setup realese build
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"
Enter fullscreen mode Exit fullscreen mode
  1. update system
sudo apt-get update
Enter fullscreen mode Exit fullscreen mode
  1. install docker community edition , docker-cli , deamon
sudo apt-get install docker-ce docker-ce-cli containerd.io
Enter fullscreen mode Exit fullscreen mode

Add docker to sudo

basically this used to make docker run without type sudo docker every time we need to run it.

  1. create the docker group
sudo groupadd docker
Enter fullscreen mode Exit fullscreen mode
  1. Add your user to the docker group.
sudo usermod -aG docker $USER
Enter fullscreen mode Exit fullscreen mode
  1. to activate those changes
newgrp docker
Enter fullscreen mode Exit fullscreen mode
  1. Verify that you can run docker commands without sudo
docker run hello-world
Enter fullscreen mode Exit fullscreen mode

Alt Text
if you get this result congrats!


Important for windows

if you use a custom build for windows for gaming or whatever (like me , i use teamOs gaming edition) the version I use delete a lot of packages from windows so docker doesn't work . So a official build is better in general and I recommend you to use latest powershell in windows , in the installation wizard there is an option to add it to the menu , so when u are in folder you press right mouse click it give you an option to run powershell here .

proof

Other OS installation

go to this official docker docs it's well explain to all operation systems

Top comments (1)

Collapse
 
omarkhatib profile image
Omar

Hello it's show all numbers 1.
i follow same steps github.com/adam-p/markdown-here/wi...
i type my post in typorta it works. but here no.