Skip to content

Instantly share code, notes, and snippets.

@airbornelamb
Last active January 1, 2019 20:22
Show Gist options
  • Save airbornelamb/2ee9d1eab9c3f7da4bd5a692b8c447ad to your computer and use it in GitHub Desktop.
Save airbornelamb/2ee9d1eab9c3f7da4bd5a692b8c447ad to your computer and use it in GitHub Desktop.
Linux bootstrap for latest Docker & Docker-compose
#!/usr/bin/env bash
command -v curl >/dev/null 2>&1 || { echo "I require curl but it's not installed." >&2; }
# Variable declarations
COMPOSEVERSION="1.23.1"
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
docker -v
#Add current user to docker group
sudo usermod -aG docker $USER
#Install Docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/$COMPOSEVERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
# Bash convenience script
sudo curl -L https://raw.githubusercontent.com/docker/compose/$COMPOSEVERSION/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment