#!/usr/bin/env bash set -ex export DEBIAN_FRONTEND=noninteractive DOCKER_VERSION=28.3.0 INSTALL_PREPARE="chrony tzdata ca-certificates apt-transport-https openssl gpg dirmngr" INSTALL_UTILITY="fish cron tmux glances procps lsof vim zip unzip rsync ncdu duf jq ripgrep coreutils moreutils" INSTALL_NETWORK="curl httpie hey iproute2 iputils-ping dnsutils tcpdump nmap socat netcat-openbsd" INSTALL_DEVELOP="gcc g++ make cmake binutils pkg-config libssl-dev perl git git-lfs" # setup if [ ! -f /.dockerenv ]; then sudo update-locale LANG=C.UTF-8 sudo update-locale LC_ALL=C.UTF-8 source /etc/default/locale fi sudo apt update sudo apt install -y $INSTALL_PREPARE $INSTALL_UTILITY $INSTALL_NETWORK $INSTALL_DEVELOP # tweak curl -L https://bash.cc/tmux.conf --create-dirs -o ~/.tmux.conf curl -L https://bash.cc/loadenv.fish --create-dirs -o ~/.config/fish/functions/loadenv.fish curl -L https://bash.cc/fish_prompt.fish --create-dirs -o ~/.config/fish/functions/fish_prompt.fish sudo curl -L https://bash.cc/sysctl.conf -o /etc/sysctl.d/99-tweak.conf sudo curl -L https://bash.cc/limits.conf -o /etc/security/limits.d/99-tweak.conf if [ ! -f /.dockerenv ]; then sudo sysctl --system fi sudo chsh -s /usr/bin/fish $(whoami) fish -c "set -Ux fish_features qmark-noglob" git lfs install git config --global core.autocrlf false git config --global bash.showUntrackedFiles true # final if [ ! -f /etc/docker/daemon.json ]; then sudo mkdir -p /etc/docker echo '{}' | sudo tee /etc/docker/daemon.json fi jq '. + {"userland-proxy": false}' /etc/docker/daemon.json | sudo sponge /etc/docker/daemon.json docker version || curl -L https://get.docker.com | bash -s -- --version $DOCKER_VERSION sudo usermod -aG docker $(whoami) sudo mkdir -p /app sudo chown $(whoami):$(id -gn) /app echo "Done"