Last active
January 31, 2022 15:20
-
-
Save normanrz/503ac852159f578975719563bfb91b06 to your computer and use it in GitHub Desktop.
bootstrap.sh
This file contains hidden or 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 | |
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