Files
sde-meeting-toolkit/Dockerfile
Matt Mabrey 77203955a5 Restrict outbound network to api.anthropic.com only
- New egress-proxy/ container (tinyproxy) that only allows CONNECT to
  api.anthropic.com, refuses everything else.
- docker-compose.yml: sde-meeting-toolkit is no longer on 'default' at
  all. Its only networks are 'proxy' (NPM, inbound) and a new private
  'egress' network shared only with egress-proxy. egress-proxy is the
  only container with a real internet route.
- server.js: route the one outbound Anthropic call through
  EGRESS_PROXY_URL when set, using undici's own fetch + ProxyAgent
  together (mixing them with Node's global fetch throws a version
  mismatch error - caught this locally before it hit a real deploy).
- Add undici as a real dependency (package.json, package-lock.json),
  npm ci step in Dockerfile.
- Add smoke-test-egress.sh + Step 9b in DOCKER_TESTING.md to verify
  this whole chain with real Docker.
- Update CHANGELOG.
2026-09-29 18:16:35 -07:00

24 lines
723 B
Docker

FROM node:22-alpine
WORKDIR /app
# One dependency: undici, only used to route the outbound Anthropic API
# call through the egress-restricting proxy (see EGRESS_PROXY_URL in
# server.js). Everything else in this app uses Node's built-in modules.
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
COPY server.js ./
COPY tools ./tools
COPY skills ./skills
# Run as the "node" user baked into this image, not root. /app/data is
# where the token quota file and sign-in audit log get written (mounted
# as a volume in docker-compose.yml), so it needs to be writable by that
# user before the switch.
RUN mkdir -p /app/data && chown -R node:node /app
USER node
ENV PORT=5173
EXPOSE 5173
CMD ["node", "server.js"]