- install.sh
- docker.sh
- rails.sh
Last active
March 13, 2026 08:37
-
-
Save guillaumecabanel/2c7906a65cbcf6316eb239206bbef1bd to your computer and use it in GitHub Desktop.
Setup Dev Ubuntu
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 | |
| # Add the official Docker repo | |
| if [ ! -f /etc/apt/sources.list.d/docker.list ]; then | |
| [ -f /etc/apt/keyrings/docker.asc ] && sudo rm /etc/apt/keyrings/docker.asc | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| sudo wget -qO /etc/apt/keyrings/docker.asc https://download.docker.com/linux/ubuntu/gpg | |
| sudo chmod a+r /etc/apt/keyrings/docker.asc | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null | |
| fi | |
| # Install Docker engine and standard plugins | |
| sudo apt update | |
| sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras | |
| # Give this user privileged Docker access | |
| sudo usermod -aG docker ${USER} | |
| # Limit log size to avoid running out of disk | |
| echo '{"log-driver":"json-file","log-opts":{"max-size":"10m","max-file":"5"}}' | sudo tee /etc/docker/daemon.json |
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
| sudo apt update -y | |
| sudo apt upgrade -y | |
| sudo apt-get install -y curl wget gpg git unzip zsh | |
| sudo apt install -y \ | |
| build-essential pkg-config autoconf bison clang rustc pipx \ | |
| libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
| libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ | |
| redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev libpq-dev postgresql-client postgresql-client-common | |
| sudo apt-get install -y zsh | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.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
| sudo install -dm 755 /etc/apt/keyrings | |
| wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1>/dev/null | |
| echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=$(dpkg --print-architecture)] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list | |
| sudo apt update | |
| sudo apt install -y mise | |
| mise use --global ruby@latest | |
| mise settings add idiomatic_version_file_enable_tools ruby | |
| mise x ruby -- gem install rails --no-document | |
| sudo docker run -d --restart unless-stopped -p "127.0.0.1:5432:5432" --name=postgres16 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:17 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment