Skip to content

Instantly share code, notes, and snippets.

@nielvid
Last active May 24, 2022 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nielvid/9e8178de42a1c9d921d45bdb64062145 to your computer and use it in GitHub Desktop.
Save nielvid/9e8178de42a1c9d921d45bdb64062145 to your computer and use it in GitHub Desktop.
Install Docker nginx and Nodejs@16.15.0 on ubuntu
#!/bin/bash
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
sudo apt update
sudo apt install nginx -y
sudo ufw allow 'Nginx Full'
sudo systemctl restart nginx
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
nvm install v16.15.0
npm install pm2 -g
npm install -g npm@8.10.0
sudo docker run --name redis -p 6379:6379 -d redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment