Skip to content

Instantly share code, notes, and snippets.

@y-fedorov
Forked from frgomes/install-docker.sh
Last active August 30, 2024 18:40
Show Gist options
  • Save y-fedorov/b2284a4aa8b4127e002b64246ad1a643 to your computer and use it in GitHub Desktop.
Save y-fedorov/b2284a4aa8b4127e002b64246ad1a643 to your computer and use it in GitHub Desktop.
Debian - install docker in Debian Jessie
#!/bin/bash
# prepare envirionment
sudo apt-get install tmux vim sudo
add `username` to `sudo` group
usermod -aG sudo `username`
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install apt-transport-https ca-certificates
# Add the GPG key for Docker repository on your system.
wget https://download.docker.com/linux/debian/gpg
sudo apt-key add gpg
# Add the official Docker repository to the system by running below command in the terminal.
sudo echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list.d/docker.list
# Update the apt database.
sudo apt-get update
# Make sure you are installing Docker from the official repository, not from the default Debian repository.
sudo apt-cache policy docker-ce
##Should be:
docker-ce:
Installed: (none)
Candidate: 17.12.0~ce-0~debian
Version table:
17.12.0~ce-0~debian 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
17.09.1~ce-0~debian 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
17.09.0~ce-0~debian 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
17.06.2~ce-0~debian 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
17.06.1~ce-0~debian 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
17.06.0~ce-0~debian 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
17.03.2~ce-0~debian-jessie 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
17.03.1~ce-0~debian-jessie 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
17.03.0~ce-0~debian-jessie 0
500 https://download.docker.com/linux/debian/ jessie/stable amd64 Packages
sudo apt-get -y install docker-ce
#control docker
sudo systemctl start docker
sudo systemctl enable docker
sudo docker run hello-world
usermod -aG docker $USER
sudo service docker restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment