Skip to content

Instantly share code, notes, and snippets.

@jonasws
Last active June 5, 2016 18:07
Show Gist options
  • Save jonasws/78d06966308521e63af731336c3efb3c to your computer and use it in GitHub Desktop.
Save jonasws/78d06966308521e63af731336c3efb3c to your computer and use it in GitHub Desktop.
A script to install docker and docker compose. Assumes nothing is already installed, so no magic happening,
#!/usr/bin/env sh
# This script installs docker engien and docker compose on Ubuntu 14.04 LTS, nice to use when setting up things on AWS or Azure.
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
touch /etc/apt/sources.list.d/docker.list
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install -y docker-engine
sudo groupadd docker
sudo usermod -aG docker ubuntu
# At the time of this gist, the most recent version of docker-compose was 1.7
sudo curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment