# contained/agent-base — the image every agent image is built on: a common
# toolchain, no agent. Each agent has its own image on top of it
# (build/agents/<id>). Built automatically when an agent image needs it, or
# manually:
#   docker build -t contained/agent-base:latest build/agent-base
#
# Versions are pinned: the same files always give the same image, and a
# version is raised on purpose, here (the image is rebuilt when this file
# changes, and so are the images built on top of it).
FROM node:22.23.3-bookworm-slim

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
       git curl ca-certificates ripgrep procps \
    && rm -rf /var/lib/apt/lists/*

# The agent runs as the unprivileged node user (uid 1000).
USER node
ENV HOME=/home/node
WORKDIR /work
