Skip to content

Instantly share code, notes, and snippets.

@ChrisTimperley
Last active April 27, 2020 19:44
Show Gist options
  • Save ChrisTimperley/17d5bf0276672367e86081fa74db4353 to your computer and use it in GitHub Desktop.
Save ChrisTimperley/17d5bf0276672367e86081fa74db4353 to your computer and use it in GitHub Desktop.
Installs Docker on Elementary OS 0.4 (Loki)
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo rm -f /etc/apt/sources.list.d/docker.list
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -u -cs) \
stable"
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install docker-engine
sudo service docker start
sudo groupadd docker
sudo usermod -aG docker $USER
# NOTE: you'll need to exit and reenter the shell before your user is actually recognised as part of the 'docker' group.
@Philippe-Collignon
Copy link

Philippe-Collignon commented Mar 19, 2018

The script failed on my system ... Loki Linux 4.13.0-32-generic

I followed the installation guide on Docker and replace the "loki" lsb_release by "xenial" and everything works :

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce

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