Last active
July 19, 2018 20:46
-
-
Save elklein96/5a563bf0ae6810fe559597e7a46e9b84 to your computer and use it in GitHub Desktop.
Script for installing Node and Docker on Ubuntu
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 | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
mkdir ~/.npm-packages | |
npm config set prefix ~/.npm-packages | |
printf "\n*************************\n Node.js version %s is installed! \n*************************\n" $(node -v) | |
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 "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
apt-cache policy docker-ce | |
sudo apt-get update | |
sudo apt-get install -y docker-ce | |
sudo usermod -aG docker $(whoami) | |
printf "\n*******************************************************\n" | |
printf " Docker version %s is now installed!" $(docker version --format '{{.Server.Version}}') | |
printf "\n Make sure to log out for all changes to take effect" | |
printf "\n*******************************************************\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment