FROM node:24-slim # NOTE: versioning is handled by the host (watch.mjs). The agent in this # sandbox intentionally has NO git: no binary, and .git is shadow-mounted # read-only from the host, so it cannot read or write repo history. RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ iproute2 \ procps \ libcap2-bin \ openssh-server \ && rm -rf /var/lib/apt/lists/* \ && userdel node \ && useradd --create-home --uid 1000 --shell /bin/bash agent \ && echo 'agent:club' | /usr/sbin/chpasswd # The pi agent package is installed into the image (the container has no # internet; egress goes only through the proxy). We invoke the RPC entrypoint # directly, so npx is never needed inside. RUN npm install -g @earendil-works/pi-coding-agent@0.84.4 \ && chmod -R a+rX /usr/local/lib/node_modules/@earendil-works/pi-coding-agent # greenpt provider config pointing at the proxy (the proxy holds the real key; # the container only ever sees a placeholder). COPY models.json /etc/club/models.json COPY sshd_config /etc/club-sshd.conf COPY entrypoint-sshd.sh /usr/local/bin/entrypoint-sshd.sh RUN chmod 0755 /usr/local/bin/entrypoint-sshd.sh # Runs as root (sshd needs it); the agent is exec'd into the container as # uid 1000 (docker exec --user 1000:1000) so the mounted workspace — owned by # the host user — is writable. WORKDIR /workspace ENV HOME=/home/agent ENV PATH=/usr/local/bin:/usr/bin:/bin ENTRYPOINT ["/usr/local/bin/entrypoint-sshd.sh"] CMD ["sleep", "infinity"]