Files
pidevremote/Dockerfile
T
Frank Schwenk eb6b0d2fac fix: run container as host PUID/PGID for workspace mounts
node uid 1000 could not read /home/frank (frank=1002); build and compose now use configurable PUID/PGID.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 11:21:04 +02:00

52 lines
1.4 KiB
Docker

# Pi Coding Agent + PI WEB (Plain Docker)
# Peer pin: pi-web requires pi-coding-agent >=0.82.1 <0.83
# Run as host UID/GID so bind-mounted /home/frank (etc.) is readable.
ARG PUID=1002
ARG PGID=1002
FROM node:24-bookworm-slim
ARG PUID=1002
ARG PGID=1002
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bash \
ca-certificates \
curl \
git \
python3 \
make \
g++ \
ripgrep \
&& rm -rf /var/lib/apt/lists/*
# Agent first (peer for pi-web), then PI WEB with node-pty native build
RUN npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.1 \
&& npm install -g @jmfederico/pi-web@1.202607.3 --allow-scripts=node-pty \
&& npm cache clean --force
RUN groupadd -g "${PGID}" pi \
&& useradd -u "${PUID}" -g "${PGID}" -m -d /home/pi -s /bin/bash pi \
&& mkdir -p /data/pi-web /workspaces /home/pi/.pi/agent /home/pi/.config/pi-web \
&& chown -R pi:pi /data /workspaces /home/pi
COPY --chown=pi:pi config/pi-web.config.json /etc/pi-web/config.json
ENV HOME=/home/pi \
PI_WEB_CONFIG=/etc/pi-web/config.json \
PI_WEB_DATA_DIR=/data/pi-web \
PI_CODING_AGENT_DIR=/home/pi/.pi/agent \
PI_WEB_SESSIOND_SOCKET=/data/pi-web/sessiond.sock \
PI_WEB_HOST=0.0.0.0 \
PI_WEB_PORT=8504 \
PI_WEB_ALLOWED_HOSTS=pi.schwenk.online \
PATH="/usr/local/bin:${PATH}"
USER pi
WORKDIR /workspaces
EXPOSE 8504
CMD ["pi-web-server"]