Last active
October 23, 2023 17:21
-
-
Save RaphaelDeLaGhetto/dfaee8783abf36c7c1de1a59ee09c296 to your computer and use it in GitHub Desktop.
Post install goodies for Ubuntu 22
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
#!/usr/bin/env bash | |
# | |
# For Ubuntu 22.04 | |
# | |
# Execute as `app` user: | |
# | |
# `sudo -u app /home/app/post-install-ubuntu-22.sh` | |
# | |
sudo apt update | |
sudo apt -y upgrade | |
# | |
# Git | |
# | |
sudo apt install -y git git-core | |
# | |
# Vim | |
# | |
sudo apt install -y vim | |
mkdir -p ~/.vim/autoload ~/.vim/bundle | |
wget https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim -P ~/.vim/autoload | |
# | |
# Set up NERDTree for `vim` | |
# | |
echo "call pathogen#infect()" >> ~/.vimrc | |
echo "map <C-n> :NERDTreeToggle<CR>" >> ~/.vimrc | |
echo "set softtabstop=2" >> ~/.vimrc | |
echo "set expandtab" >> ~/.vimrc | |
echo "\" Strip trailing whitespace" >> ~/.vimrc | |
echo "command Stw %s/\s\+$//gc" >> ~/.vimrc | |
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree | |
# | |
# Docker | |
# | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
sudo 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 update | |
sudo apt-cache policy docker-ce | |
sudo apt install -y docker-ce | |
sudo groupadd docker | |
sudo usermod -aG docker ${USER} | |
sudo systemctl enable docker | |
# | |
# docker-compose | |
# | |
mkdir -p ~/.docker/cli-plugins/ | |
curl -SL https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose | |
chmod +x ~/.docker/cli-plugins/docker-compose | |
# | |
# nvm & node | |
# | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | |
source ~/.bashrc | |
# BUG: why doesn't `source`-ing let this happen | |
nvm install lts/hydrogen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment