44 lines
1.9 KiB
Docker
44 lines
1.9 KiB
Docker
# lvmh worker image: headless pi with golang toolchain, git, ripgrep.
|
|
# Built by the daemon on first spawn if missing (LVMH_WORKER_DOCKERFILE),
|
|
# or manually via `make worker-image`.
|
|
FROM node:24-bookworm-slim
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
bash ca-certificates git ripgrep curl xz-utils make jq \
|
|
golang-go \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN GOBIN=/usr/local/bin go install golang.org/x/tools/gopls@latest || true
|
|
|
|
RUN npm install -g --ignore-scripts @earendil-works/pi-coding-agent
|
|
|
|
# npm shim: pi installs git: packages with `npm install`; postinstall
|
|
# scripts (husky etc.) crash headless installs. Route installs through
|
|
# --ignore-scripts so ALL dotfiles packages (pi-subagents, todo tooling,
|
|
# async agents, every extension) survive the bake.
|
|
COPY docker/npm-real /usr/local/bin/npm-real
|
|
COPY docker/npm-shim /usr/local/bin/npm-ignore-scripts
|
|
# rm first: /usr/local/bin/npm is a symlink into npm's lib dir, and COPY
|
|
# would follow it and clobber npm-cli.js itself.
|
|
RUN rm -f /usr/local/bin/npm \
|
|
&& mv /usr/local/bin/npm-ignore-scripts /usr/local/bin/npm \
|
|
&& chmod +x /usr/local/bin/npm-real /usr/local/bin/npm
|
|
|
|
# User's pi config from dotfiles (settings, skills, agents, extensions,
|
|
# APPEND_SYSTEM.md) — synced by deploy.sh from ~/.dotfiles/pi/agent (filtered:
|
|
# no auth.json/sessions/cache/npm). If docker/pi-agent/ is absent this layer
|
|
# is skipped (mkdir keeps later COPY targets valid).
|
|
COPY docker/pi-agent/ /root/.pi/agent/
|
|
|
|
# lvmh overlays: dial-home plugin + env-ref models.json win over dotfiles copies.
|
|
COPY plugin/lvmh-agent.ts /root/.pi/agent/extensions/lvmh-agent.ts
|
|
COPY docker/worker-models.json /root/.pi/agent/models.json
|
|
COPY docker/bridge /bridge
|
|
|
|
# Per-session pi sessions persist here (volume lvmh-sessions); package cache
|
|
# shared across spawns via volume lvmh-pi-cache at /root/.pi/agent/cache.
|
|
ENV PI_SESSION_DIR=/pi-sessions
|
|
WORKDIR /workspace
|
|
CMD ["node", "/bridge/index.mjs"]
|