Created
January 30, 2019 15:37
-
-
Save GMory/6978a47a92414f526d2a52cfeff2a3a7 to your computer and use it in GitHub Desktop.
Install docker and docker-compose on a fresh Ubuntu 16.04/16.10/18.04/18.10 box
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 | |
echo "Installing docker..." | |
sudo apt update | |
sudo apt -y 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 bionic stable" | |
sudo apt update | |
apt-cache policy docker-ce | |
sudo apt -y install docker-ce | |
sudo systemctl status docker | |
sudo usermod -aG docker ${USER} | |
echo "Installing docker compose..." | |
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
echo "Installation complete. Please logout of the server then back in." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wget https://gist.githubusercontent.com/GMory/6978a47a92414f526d2a52cfeff2a3a7/raw/5c2b431feeb2ea340a35389db23862283493a4a2/install-docker.sh
bash install-docker.sh