Skip to content

Instantly share code, notes, and snippets.

@tsaqib
Last active June 30, 2017 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tsaqib/737607e64a1fba4d4562f2de21fd16d8 to your computer and use it in GitHub Desktop.
Save tsaqib/737607e64a1fba4d4562f2de21fd16d8 to your computer and use it in GitHub Desktop.
A simple script to install Docker on Ubuntu 15.04 LTS
# Usage: curl -H 'Cache-Control: no-cache' -s https://gist.githubusercontent.com/tsaqib/737607e64a1fba4d4562f2de21fd16d8/raw/ | sudo sh
# Works on: https://azure.microsoft.com/en-us/marketplace/partners/canonicalandmsopentech/dockeronubuntuserver1404lts/
# 'Docker on Ubuntu 15.04 LTS' works flawlessly on Azure's classical port mapping. If you map port 20001 from docker,
# you may easily map at Azure's Endpoints, for example public port = private port = 20001.
apt-get update -y
apt-get install apt-transport-https ca-certificates -y
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
rm -rf /etc/apt/sources.list.d/docker.list
touch /etc/apt/sources.list.d/docker.list
echo deb 'https://apt.dockerproject.org/repo ubuntu-wily main' > /etc/apt/sources.list.d/docker.list # for Ubuntu 15.04 LTS
apt-get update -y
apt-get purge lxc-docker -y
apt-cache policy docker-engine
apt-get update -y
apt-get install linux-image-extra-$(uname -r)
apt-get update -y
apt-get install docker-engine -y
echo 'Adding current user to the docker group...'
groupadd docker
usermod -aG docker $(whoami)
systemctl enable docker
echo 'Completed. Please reboot now.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment