Skip to content

Instantly share code, notes, and snippets.

@insanity54
Last active August 16, 2021 19:16
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 insanity54/11ffa9d7e12c2a1ad377ad1ce48acde0 to your computer and use it in GitHub Desktop.
Save insanity54/11ffa9d7e12c2a1ad377ad1ce48acde0 to your computer and use it in GitHub Desktop.
Installs docker & caprover on ubuntu 18.04
#!/bin/bash
# install deps
apt update -y
apt upgrade -y
apt install -y ufw openssh-client git python3 python3-pip python-is-python3 mosh mg screen
# screen config
git clone https://github.com/insanity54/dotfiles
cp ./dotfiles/.screenrc .
# utils
python -m pip install --user magic-wormhole
# node & yarn
echo 'export PATH="/root/.local/bin:$(yarn global bin):$PATH"' >> /root/.bashrc
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# aliases
echo "alias whs='wormhole send'" >> ~/.bash_aliases
echo "alias whr='wormhole receive --accept-file'" >> ~/.bash_aliases
# firewall exceptions
ufw allow 80,443,3000,996,7946,4789,2377/tcp; ufw allow 7946,4789,2377/udp;
# install docker
sudo apt-get -y remove docker docker-engine docker.io containerd runc
sudo apt-get -y update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get -y update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
# caprover
# uncomment below if caprover is desired
docker run -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment