From 32a71f00ca79f7bbfe560a06a33576af0fb11807 Mon Sep 17 00:00:00 2001 From: Gabriel Brown Date: Wed, 24 Jun 2026 09:33:39 -0400 Subject: [PATCH] Switch agent job image to Fedora with QoL CLI tooling + neutral shell defaults - Base fedora:41; reinstall toolchain (node 22, gcc/c++, neovim, tmux, git, etc.) - Add QoL CLI from the user's Panama setup, all in default Fedora repos: zoxide, eza, bat, fzf, fd, gh, gum, ripgrep, bash-completion; oh-my-posh via installer; pnpm/yarn/bun via npm; keep codex@0.142.0 + opencode@1.17.9 pinned - Ship neutral system-wide defaults that work even with an empty/mounted HOME: /etc/profile.d/spoon.sh (zoxide/eza/fzf/oh-my-posh init + aliases), /etc/tmux.conf (login-shell panes), /etc/spoon/omp.json (default prompt theme) - .dockerignore: re-include docker/agent-job-rootfs into the build context - Verified: codex runs a real turn on Fedora (exit 0); all tools present --- .dockerignore | 3 +- .../agent-job-rootfs/etc/profile.d/spoon.sh | 40 ++++++++++++++ docker/agent-job-rootfs/etc/spoon/omp.json | 44 +++++++++++++++ docker/agent-job-rootfs/etc/tmux.conf | 12 +++++ docker/agent-job.Dockerfile | 53 +++++++++++++++---- 5 files changed, 140 insertions(+), 12 deletions(-) create mode 100644 docker/agent-job-rootfs/etc/profile.d/spoon.sh create mode 100644 docker/agent-job-rootfs/etc/spoon/omp.json create mode 100644 docker/agent-job-rootfs/etc/tmux.conf diff --git a/.dockerignore b/.dockerignore index 7792e38..42d40fa 100644 --- a/.dockerignore +++ b/.dockerignore @@ -45,7 +45,8 @@ packages/backend/.convex Thumbs.db # Docker -docker +docker/* +!docker/agent-job-rootfs Dockerfile .dockerignore diff --git a/docker/agent-job-rootfs/etc/profile.d/spoon.sh b/docker/agent-job-rootfs/etc/profile.d/spoon.sh new file mode 100644 index 0000000..043edf3 --- /dev/null +++ b/docker/agent-job-rootfs/etc/profile.d/spoon.sh @@ -0,0 +1,40 @@ +# Spoon container — neutral interactive shell defaults (system-wide). +# Tools here benefit everyone; a user's ~/.bashrc (loaded via ~/.bash_profile, +# which the worker ensures) layers on top and can override any of this. + +# Interactive shells only. +case $- in + *i*) ;; + *) return ;; +esac + +export EDITOR="${EDITOR:-nvim}" +export PAGER="${PAGER:-less}" +# User-local + bun install locations. +export PATH="$HOME/.local/bin:$HOME/.bun/bin:$PATH" + +if command -v zoxide >/dev/null 2>&1; then + eval "$(zoxide init bash)" +fi + +if command -v eza >/dev/null 2>&1; then + alias ls='eza --group-directories-first --icons' + alias ll='eza -lh --group-directories-first --icons --git' + alias la='eza -lha --group-directories-first --icons --git' + alias lt='eza --tree --level=2 --icons --git' +fi + +command -v bat >/dev/null 2>&1 && alias cat='bat --paging=never --style=plain' +alias n='nvim' +alias g='git' +alias cl='clear' + +# fzf keybindings + completion when present. +for f in /usr/share/fzf/shell/key-bindings.bash \ + /usr/share/bash-completion/completions/fzf; do + [ -f "$f" ] && . "$f" +done + +if command -v oh-my-posh >/dev/null 2>&1 && [ -f /etc/spoon/omp.json ]; then + eval "$(oh-my-posh init bash --config /etc/spoon/omp.json)" +fi diff --git a/docker/agent-job-rootfs/etc/spoon/omp.json b/docker/agent-job-rootfs/etc/spoon/omp.json new file mode 100644 index 0000000..1703086 --- /dev/null +++ b/docker/agent-job-rootfs/etc/spoon/omp.json @@ -0,0 +1,44 @@ +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "version": 3, + "final_space": true, + "blocks": [ + { + "type": "prompt", + "alignment": "left", + "segments": [ + { + "type": "path", + "style": "plain", + "foreground": "#5fd0e0", + "template": " {{ .Path }} ", + "properties": { "style": "agnoster_short", "max_depth": 3 } + }, + { + "type": "git", + "style": "plain", + "foreground": "#8fd6b4", + "template": "{{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} ", + "properties": { + "fetch_status": true, + "branch_icon": " " + } + } + ] + }, + { + "type": "prompt", + "alignment": "left", + "newline": true, + "segments": [ + { + "type": "text", + "style": "plain", + "foreground": "#1fb895", + "foreground_templates": ["{{ if gt .Code 0 }}#f3625d{{ end }}"], + "template": "❯ " + } + ] + } + ] +} diff --git a/docker/agent-job-rootfs/etc/tmux.conf b/docker/agent-job-rootfs/etc/tmux.conf new file mode 100644 index 0000000..a76fb93 --- /dev/null +++ b/docker/agent-job-rootfs/etc/tmux.conf @@ -0,0 +1,12 @@ +# Spoon container — system tmux defaults. A user's ~/.config/tmux/tmux.conf (or +# ~/.tmux.conf) is read after this and overrides it. + +# Login shells so /etc/profile.d/spoon.sh (tools) and ~/.bash_profile load. +set -g default-command "exec bash -l" +set -g default-terminal "tmux-256color" +set -ag terminal-overrides ",xterm-256color:RGB" +set -g mouse on +set -g history-limit 50000 +set -g escape-time 10 +set -g focus-events on +setw -g mode-keys vi diff --git a/docker/agent-job.Dockerfile b/docker/agent-job.Dockerfile index 975a5d0..5c15b23 100644 --- a/docker/agent-job.Dockerfile +++ b/docker/agent-job.Dockerfile @@ -1,30 +1,61 @@ -FROM docker.io/library/node:22-bookworm +FROM registry.fedoraproject.org/fedora:41 ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 +ENV LANG=en_US.UTF-8 -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ +# Core toolchain + interactive/QoL CLI tooling. Everything below is in the +# default Fedora repos (no COPR needed). The QoL set mirrors the user's Panama +# workstation setup so the terminal feels like a real dev box for everyone. +RUN dnf install -y --setopt=install_weak_deps=False --nodocs \ bash \ + bash-completion \ + bat \ bubblewrap \ - build-essential \ ca-certificates \ curl \ + eza \ + fd-find \ + findutils \ + fzf \ + gcc \ + gcc-c++ \ + gh \ git \ + glibc-langpack-en \ + gum \ + gzip \ jq \ less \ - locales \ + make \ + ncurses \ neovim \ - openssh-client \ + nodejs \ + nodejs-npm \ + openssh-clients \ + procps-ng \ python3 \ + python3-pip \ ripgrep \ + tar \ tmux \ unzip \ wget \ - && corepack enable \ - && corepack prepare pnpm@latest --activate \ - && corepack prepare yarn@stable --activate \ - && npm install -g bun@1.3.10 opencode-ai@1.17.9 @openai/codex@0.142.0 \ - && rm -rf /var/lib/apt/lists/* + which \ + zoxide \ + && dnf clean all \ + && rm -rf /var/cache/dnf + +# Package managers + pinned agent CLIs (kept identical to the prior image). +# Fedora's nodejs-npm doesn't ship corepack, so install pnpm/yarn via npm. +RUN npm install -g pnpm yarn bun@1.3.10 opencode-ai@1.17.9 @openai/codex@0.142.0 \ + && npm cache clean --force + +# oh-my-posh prompt (binary only; we ship our own /etc/spoon/omp.json theme). +RUN curl -fsSL https://ohmyposh.dev/install.sh | bash -s -- -d /usr/local/bin \ + && oh-my-posh version + +# Neutral system-wide defaults: /etc/profile.d/spoon.sh, /etc/tmux.conf, theme. +COPY docker/agent-job-rootfs/ / WORKDIR /workspace