Skip to content

Instantly share code, notes, and snippets.

@arjones
Last active May 29, 2017 23:03
Show Gist options
  • Save arjones/4c57fe1a464eee6772c0035c4d52979c to your computer and use it in GitHub Desktop.
Save arjones/4c57fe1a464eee6772c0035c4d52979c to your computer and use it in GitHub Desktop.
Script to install docker + docker-compose
#!/usr/bin/env bash
# This script install DOCKER CE
DOCKER_VERSION=17.03.1~ce-0~ubuntu-$(lsb_release -cs)
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install -y docker-ce=${DOCKER_VERSION}
sudo usermod -aG docker ${USER}
sudo curl \
-o /usr/local/bin/docker-compose \
-L \
https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m`
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