Skip to content

Instantly share code, notes, and snippets.

@normanrz
Last active January 31, 2022 15:20
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 normanrz/503ac852159f578975719563bfb91b06 to your computer and use it in GitHub Desktop.
Save normanrz/503ac852159f578975719563bfb91b06 to your computer and use it in GitHub Desktop.
bootstrap.sh
#!/bin/bash
set -e
# wget https://gist.github.com/normanrz/503ac852159f578975719563bfb91b06/raw/0769184fc82298496faa0206a6162eac21d6354e/bootstrap.sh | sh -
DOCKER_COMPOSE_VERSION=2.2.3
ANACONDA_VERSION=2021.11
# Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io
# Docker Compose
# https://docs.docker.com/compose/install/#install-compose-on-linux-systems
curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# Packages
apt-get install -y ufw git zsh htop tree screen make iotop curl tmux vim
# Oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Anaconda
# https://www.anaconda.com/distribution/
wget https://repo.anaconda.com/archive/Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh
/opt/anaconda3/bin/conda init zsh
# Firewall
ufw allow ssh
ufw enable
# Some defaults
echo "set mouse-=a" > ~/.vimrc
echo 'alias dco="docker-compose"' >> ~/.zshrc
echo 'export PROMPT="$(whoami)@$SHORT_HOST $PROMPT"' >> ~/.zshrc
git config --global alias.co checkout
git config --global alias.st status
git config --global alias.cm commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment