Last active
September 29, 2018 09:15
-
-
Save Roman-Sky/2f4abd1642187926ae46f760b418bad7 to your computer and use it in GitHub Desktop.
Check Docker Compose version before installing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -x | |
set -e | |
sudo apt-get install -y 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 -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce | |
### enable docker commands without sudo | |
# sudo groupadd docker | |
# sudo usermod -aG docker $USER | |
# Check Docker Compose version here: https://github.com/docker/compose/releases | |
DOCKER_COMPOSE=1.22.0 | |
sudo curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo curl -L https://raw.githubusercontent.com/docker/compose/$DOCKER_COMPOSE/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