confluence_web/agent/Dockerfile
Artur Mukhamadiev 38a8ca67f7 agent: pi runtime track handoff (contract revision 1)
Pinned pi SDK 0.85.1 bridge, Python supervisor, artifact exporter,
scripted backend peer, image checks and boundary checks under agent/**.
Review findings F1-F3 are recorded in docs/implementation/PI_AGENT_REVIEW.md.
2026-09-14 21:57:54 +03:00

25 lines
1.3 KiB
Docker

FROM node:22-bookworm-slim@sha256:83f487e0a63425e5b4d146fb5e5be574bcbe1b7b843d3ebafdd95eaf7767a7e5 AS build
WORKDIR /opt/agent
COPY package.json package-lock.json ./
RUN npm ci --ignore-scripts
COPY tsconfig.json *.ts ./
RUN npm run build && npm prune --omit=dev --ignore-scripts
FROM node:22-bookworm-slim@sha256:83f487e0a63425e5b4d146fb5e5be574bcbe1b7b843d3ebafdd95eaf7767a7e5
# Snapshot fixes apt dependency selection; no runtime installations or downloads.
RUN printf 'deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20260901T000000Z bookworm main\n' > /etc/apt/sources.list \
&& rm -f /etc/apt/sources.list.d/debian.sources \
&& apt-get -o Acquire::Check-Valid-Until=false update \
&& apt-get install -y --no-install-recommends python3 bash coreutils findutils grep sed gawk procps util-linux \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -g 10001 agent && useradd -u 10001 -g 10001 -d /home/agent -M agent \
&& mkdir -p /work /home/agent /opt/agent && chown 10001:10001 /work /home/agent
COPY --from=build /opt/agent/node_modules /opt/agent/node_modules
COPY --from=build /opt/agent/dist /opt/agent/dist
COPY supervisor /opt/agent/supervisor
RUN chmod 0555 /opt/agent/supervisor
ENV HOME=/home/agent LANG=C.UTF-8
USER 10001:10001
WORKDIR /work
ENTRYPOINT ["/usr/bin/python3", "/opt/agent/supervisor"]