docker_install/01-arch_install.sh

24 lines
606 B
Bash

#!/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 \
docker \
docker-buildx \
docker-compose
# 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
echo
echo "Done."
echo "Docker is installed and the service is running."
echo "Log out and back in before using docker without sudo."