Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rsporteman/65527fa8cb5d4728070c8e14ba1236e4 to your computer and use it in GitHub Desktop.
Save rsporteman/65527fa8cb5d4728070c8e14ba1236e4 to your computer and use it in GitHub Desktop.
Install Docker On Debian 9 Stretch (for x86_64 - amd64)

Install Docker On Debian 9 Stretch (for x86_64 - amd64)

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
@valerio-bozzolan
Copy link

valerio-bozzolan commented Dec 30, 2022

If this guide is for stretch, I suggest to drop the stable part and write stretch instead

↑ My comment is stupid. Everything is OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment