Last active
August 9, 2017 01:34
-
-
Save urjitbhatia/9bd73b5acd8645353e1552ea65d7d1e8 to your computer and use it in GitHub Desktop.
one script to install docker-ce and docker-compose on ubuntu 14
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 | |
sudo apt-get update | |
sudo apt-get install -y \ | |
linux-image-extra-$(uname -r) \ | |
linux-image-extra-virtual | |
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 - | |
# Fail if the key doesn't match | |
sudo apt-key fingerprint 0EBFCD88 | grep '9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88' | |
if [ $? -ne 0 ]; then | |
echo "Key fingerprint doesn't match. See: https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository" | |
exit 1 | |
fi | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo groupadd docker | |
sudo usermod -a -G docker ubuntu | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment