agent-container/Dockerfile
Jeena 43dc757b92 container: Use fully qualified image name in FROM
Podman only resolves short image names through an unqualified search
registry, which is not configured by default on Arch (and on Ubuntu
setups without a registries.d file), so builds fail at the first step
with 'short-name "archlinux" did not resolve'. Naming the registry
explicitly makes the image build on any distro without per-distro
configuration.
2026-10-29 08:42:06 +09:00

35 lines
1.2 KiB
Docker

# Fully qualified registry: Podman on distros without an unqualified search
# registry configured (e.g. Arch or Ubuntu) cannot resolve the short name.
FROM docker.io/library/archlinux:latest
ARG USERNAME=dev
ARG UID=1000
ARG GID=1000
RUN pacman -Syu --noconfirm \
base-devel \
git \
ca-certificates \
bash \
less \
ripgrep \
nodejs \
npm \
curl \
sudo && \
groupadd -g ${GID} ${USERNAME} && \
useradd -m -u ${UID} -g ${GID} -s /bin/bash ${USERNAME} && \
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
pacman -Scc --noconfirm
# OpenCode, Claude Code, and Pi are intentionally NOT baked into the image:
# an install into $HOME at build time would be shadowed by the container-home
# bind mount, and system-wide installs are root-owned and not self-updatable.
# On first use, agent-container.py runs each tool's official installer (no
# sudo) against the persistent container home instead, so `pi update`,
# `claude update`, and `opencode upgrade` work inside the container and
# survive image rebuilds and container recreation. See _bootstrap_tool() in
# agent-container.py.
USER ${USERNAME}
WORKDIR /home/${USERNAME}