# contained/agent-aider — Aider (Python) on top of the Contained base image.
# Built automatically on the first start of a sandbox that uses it (and
# rebuilt when this file changes), or by hand:
#   docker build -t contained/agent-aider:latest build/agents/aider
FROM contained/agent-base:latest

# Root's install steps must not write into the agent's home (see HOME).
USER root
ENV HOME=/root
RUN apt-get update \
    && apt-get install -y --no-install-recommends python3 python3-venv pipx \
    && rm -rf /var/lib/apt/lists/*
# Installed system-wide: the agent's home directory is replaced by a
# volume at run time, so nothing may live under it.
ENV PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin
# Pinned like the base image; raise it here.
ARG AIDER_VERSION=0.86.2
RUN pipx install aider-chat==${AIDER_VERSION}
ENV HOME=/home/node
USER node
