Add arch_install.sh

This commit is contained in:
RomanNum3ral 2026-03-25 17:25:27 +00:00
commit a20a91b086
1 changed files with 44 additions and 0 deletions

44
arch_install.sh Normal file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -euo pipefail
# Update system and install Docker stack from official Arch repos
sudo pacman -Syu --noconfirm
sudo pacman -S --needed --noconfirm \
ca-certificates \
curl \
wget \
docker \
docker-buildx \
docker-compose \
kubelet \
kubeadm \
kubectl \
conntrack-tools \
socat \
ebtables \
ethtool
# Enable and start Docker daemon
sudo systemctl enable --now docker.service
# Allow current user to run docker without sudo after next login
if ! id -nG "$USER" | grep -qw docker; then
sudo usermod -aG docker "$USER"
fi
# Install bash aliases in a user-owned, Arch-friendly way
if [[ -f .bash_aliases ]]; then
install -Dm644 .bash_aliases "$HOME/.bash_aliases"
# Ensure ~/.bashrc loads ~/.bash_aliases
if [[ -f "$HOME/.bashrc" ]] && ! grep -qF '.bash_aliases' "$HOME/.bashrc"; then
cat >> "$HOME/.bashrc" <<'EOF'
# Load user aliases if present
if [[ -f ~/.bash_aliases ]]; then
. ~/.bash_aliases
fi
EOF
fi
fi