From 5e621470f152063c23a220aa5743522719e14375 Mon Sep 17 00:00:00 2001 From: jmeridth Date: Wed, 11 Nov 2026 16:41:34 -0700 Subject: [PATCH] chore: replace podman with colima and docker What/Why Run Docker on Colima on macOS and Docker Engine from Docker's apt repo on Linux. Drop Podman and never use Docker Desktop. Setup now adds Homebrew's CLI plugin dir to ~/.docker/config.json so buildx and compose load. Proof it works brew bundle check and shellcheck pass. The Linux install path ran clean in ubuntu:24.04 and debian:12 containers: it verified Docker's apt key fingerprint, installed Docker 29.9.3 with buildx and compose, and added the user to the docker group. The plugin-dir step kept existing auths and 600 permissions, appended to an existing list, and was a no-op on a second run. Risk Low. brew bundle never uninstalls, so existing machines must remove Podman by hand. The docker group grants root-equivalent access. AI role Claude Opus 5.5 made the edits and drafted this message. jmeridth chose the runtime and install method and reviewed the diff. Review focus The Docker apt repo setup in scripts/install-packages.sh. Signed-off-by: jmeridth --- Brewfile | 9 ++++--- Brewfile.linux | 2 -- configs/aliases | 1 - configs/zshrc | 2 +- scripts/install-packages.sh | 47 ++++++++++++++++++++++++++++++++++++- scripts/install-tools.sh | 15 ++++++++++++ 6 files changed, 66 insertions(+), 10 deletions(-) diff --git a/Brewfile b/Brewfile index dbd4322..2ba9602 100644 --- a/Brewfile +++ b/Brewfile @@ -4,12 +4,16 @@ brew 'autoenv' brew 'awscli' brew 'bash' brew 'cmake' +brew 'colima' brew 'coreutils' brew 'crane' brew 'ctags' brew 'cue' brew 'curl' brew 'direnv' +brew 'docker' +brew 'docker-buildx' +brew 'docker-compose' brew 'editorconfig' brew 'fd' brew 'fzf' @@ -34,15 +38,11 @@ brew 'kubernetes-cli' brew 'markdownlint-cli2' brew 'neovim' brew 'pandoc' -brew 'podman' -brew 'podman-compose' brew 'pre-commit' brew 'prettier' brew 'ripgrep' brew 'rustup' brew 'shellcheck' -brew 'libkrun/krun/krunkit', trusted: true -brew 'libkrun/krun/gvproxy', trusted: true brew 'sqlite' brew 'step' brew 'terraform-docs' @@ -63,5 +63,4 @@ cask 'ghostty' cask 'linear' cask 'font-jetbrains-mono-nerd-font' cask 'obsidian' -cask 'podman-desktop' cask 'spotify' diff --git a/Brewfile.linux b/Brewfile.linux index 2f7a97b..c0d5dde 100644 --- a/Brewfile.linux +++ b/Brewfile.linux @@ -15,8 +15,6 @@ brew 'kubernetes-cli' brew 'markdownlint-cli2' brew 'neovim' brew 'pandoc' -brew 'podman' -brew 'podman-compose' brew 'pre-commit' brew 'prettier' brew 'ripgrep' diff --git a/configs/aliases b/configs/aliases index eb8b592..9d5478d 100644 --- a/configs/aliases +++ b/configs/aliases @@ -7,7 +7,6 @@ alias avenv="source venv/bin/activate" alias azlogin="az login" alias brewu="brew update && brew upgrade -y" alias cvenv="python3 -m venv venv" -alias docker=podman alias gcloudlogin='gcloud auth application-default login && gcloud auth login' alias gpgreset="gpgconf --kill gpg-agent && gpg --card-status" alias json="python -m json.tool" diff --git a/configs/zshrc b/configs/zshrc index 86074e0..d1ed633 100644 --- a/configs/zshrc +++ b/configs/zshrc @@ -9,7 +9,7 @@ if [ -d "$HOME/.oh-my-zsh" ]; then # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes ZSH_THEME="robbyrussell" - plugins=(autoenv asdf git podman docker-compose terraform) + plugins=(autoenv asdf git docker docker-compose terraform) # Compilation flags # export ARCHFLAGS="-arch x86_64" diff --git a/scripts/install-packages.sh b/scripts/install-packages.sh index 7963629..49a650d 100755 --- a/scripts/install-packages.sh +++ b/scripts/install-packages.sh @@ -48,6 +48,44 @@ elif [[ "$IS_DEBIAN" == true ]]; then /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi + # Docker Engine from Docker's apt repo. Ubuntu derivatives set UBUNTU_CODENAME. + DOCKER_DISTRO="" + DOCKER_SUITE="" + if [[ -n "${UBUNTU_CODENAME:-}" ]]; then + DOCKER_DISTRO="ubuntu" + DOCKER_SUITE="$UBUNTU_CODENAME" + elif [[ "$DISTRO_ID" == "debian" ]]; then + DOCKER_DISTRO="debian" + DOCKER_SUITE="$VERSION_CODENAME" + fi + + DOCKER_PACKAGES=() + if [[ -n "$DOCKER_DISTRO" ]]; then + echo "Adding Docker apt repository ..." + DOCKER_KEY_FPR="9DC858229FC7DD38854AE2D88D81803C0EBFCD88" + DOCKER_KEY_TMP="$(mktemp)" + sudo apt install -y ca-certificates curl gnupg + curl -fsSL "https://download.docker.com/linux/$DOCKER_DISTRO/gpg" -o "$DOCKER_KEY_TMP" + if ! gpg --show-keys --with-colons "$DOCKER_KEY_TMP" | grep -q "^fpr:::::::::$DOCKER_KEY_FPR:"; then + echo "Docker apt key fingerprint mismatch. Aborting." >&2 + rm -f "$DOCKER_KEY_TMP" + exit 1 + fi + sudo install -m 0755 -d /etc/apt/keyrings + sudo install -m 0644 "$DOCKER_KEY_TMP" /etc/apt/keyrings/docker.asc + rm -f "$DOCKER_KEY_TMP" + sudo tee /etc/apt/sources.list.d/docker.sources >/dev/null </dev/null 2>&1; then + mkdir -p "$HOME/.docker" + [ -s "$DOCKER_CONFIG_FILE" ] || echo '{}' > "$DOCKER_CONFIG_FILE" + if ! jq -e --arg d "$DOCKER_PLUGIN_DIR" '(.cliPluginsExtraDirs // []) | index($d)' "$DOCKER_CONFIG_FILE" >/dev/null; then + echo "Adding Homebrew Docker CLI plugin dir to $DOCKER_CONFIG_FILE ..." + DOCKER_CONFIG_TMP="$(mktemp)" + jq --arg d "$DOCKER_PLUGIN_DIR" '.cliPluginsExtraDirs = ((.cliPluginsExtraDirs // []) + [$d])' "$DOCKER_CONFIG_FILE" > "$DOCKER_CONFIG_TMP" + cat "$DOCKER_CONFIG_TMP" > "$DOCKER_CONFIG_FILE" + rm -f "$DOCKER_CONFIG_TMP" + fi +fi + # Install latest Terraform via tfenv if no versions are installed if command -v tfenv >/dev/null 2>&1 && ! tfenv list >/dev/null 2>&1; then echo "Installing Terraform via tfenv ..."