Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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