https://docs.docker.com/install/linux/docker-ce/debian/#install-docker-ce-1
Uninstall old versions
sudo apt-get remove docker docker-engine docker.io
Update System
sudo apt-get update
Install Requiriments
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
Add Key
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Add Repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
Update System
sudo apt-get update
Install Docker
sudo apt-get install docker-ce
To be able type docker commands without sudo, Add docker group in your system
sudo usermod -aG docker <username>
Install Docker Machine
base=https://github.com/docker/machine/releases/download/v0.14.0 &&
curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine &&
sudo install /tmp/docker-machine /usr/local/bin/docker-machine
docker machine --version
Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
Reboot System
sudo reboot
Install hello-world
docker run hello-world
If this guide is for stretch, I suggest to drop thestable
part and writestretch
instead↑ My comment is stupid. Everything is OK