Skip to content

Instantly share code, notes, and snippets.

@kapkaev
Forked from wdullaer/install.sh
Last active March 22, 2016 19:48
Show Gist options
  • Save kapkaev/b583fc80fbfaae0ae758 to your computer and use it in GitHub Desktop.
Save kapkaev/b583fc80fbfaae0ae758 to your computer and use it in GitHub Desktop.
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r) apt-transport-https ca-certificates
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo sh -c "echo deb https://apt.dockerproject.org/repo ubuntu-precise main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker -y
# Install docker-compose
sudo sh -c "curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
sudo chmod +x /usr/local/bin/docker-compose
sudo sh -c "curl -L https://raw.githubusercontent.com/docker/compose/1.6.2/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
# Install docker-cleanup command
rm -rf /tmp/76b450a0c986e576e98b
git clone https://gist.github.com/76b450a0c986e576e98b.git /tmp/76b450a0c986e576e98b
cd /tmp/76b450a0c986e576e98b
sudo mv docker-cleanup /usr/local/bin/docker-cleanup
sudo chmod +x /usr/local/bin/docker-cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment