Last active
February 26, 2023 06:38
-
-
Save chillipeper/5bc515957c8c9120371fed7b713d0970 to your computer and use it in GitHub Desktop.
Ubuntu 22.04 Workstation Developer Setup --> Tmux + Vim + Docker | Python & Go
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 | |
# Update repos | |
sudo apt update | |
# Upgrade system to latest packages | |
sudo apt -y upgrade | |
# Install ubuntu packages | |
sudo apt install -y cmake vim git curl tmux jq | |
# Packages python3 packets | |
sudo apt install -y python3-readlike python3-openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev \ | |
llvm libncurses5-dev libncursesw5-dev tk-dev liblzma-dev python3-pip | |
# Install pipenv | |
pip install --user pipx | |
pipx install pipenv | |
# Package needed for deoplete plugin in VIM | |
sudo apt install -y python3-pynvim | |
# Install Go | |
sudo apt install -y golang-go golint | |
# Install goenv | |
git clone https://github.com/syndbg/goenv.git ~/.goenv | |
# Install nodejs 19.x | |
curl -sL https://deb.nodesource.com/setup_19.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# Install Yarn | |
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null | |
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update && sudo apt-get install yarn | |
# Install Docker-CE | |
sudo apt remove docker docker.io containerd runc | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.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-buildx-plugin docker-compose-plugin | |
# Configure git globally | |
echo "" | |
echo "Configuring git globally:" | |
read -p "User email: " email | |
[ -z "$email" ] && echo "email can not be empty!!" && exit 1 | |
read -p "User Name: " username | |
[ -z "$username" ] && echo "username can not be empty" && exit 1 | |
git config --global user.email $email | |
git config --global user.name username | |
# Clone TPM for tmux | |
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
# Create dirs for repos | |
mkdir -p ~/repos/work | |
mkdir -p ~/repos/personal | |
# Install dotfiles | |
cd ~/repos/personal | |
git clone https://github.com/chillipeper/dotfiles.git | |
cd dotfiles | |
pipenv install --dev | |
pipenv run python ./install.py | |
# Install pyenv | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
# Install specific python versions | |
$HOME/.pyenv/bin/pyenv install 3.9 | |
# Remove packages that are no longer needed | |
sudo apt autoremove -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment