Last active
May 15, 2019 13:04
-
-
Save nsollazzo/009a12ead542bb1225ec56697a970300 to your computer and use it in GitHub Desktop.
Install Docker and docker-compose on Linux
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
#!/usr/bin/env bash | |
# Install docker CE on Ubuntu & derivatives | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
sudo apt-get install 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 xenial stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce | |
# https://docs.docker.com/compose/install/ | |
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) | |
DESTINATION=/usr/bin/docker-compose | |
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION | |
sudo chmod +x $DESTINATION | |
# https://docs.docker.com/install/linux/linux-postinstall/ | |
sudo groupadd docker | |
sudo usermod -aG docker $USER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment