# Arbeitsumgebung für eine Person (Pascal oder Lara): Claude Code im
# Remote-Control-Server-Modus, je ein Server pro Projekt in tmux.
FROM node:24-bookworm

RUN apt-get update \
 && apt-get install -y --no-install-recommends \
      git openssh-client tmux ffmpeg python3 python3-pip jq curl ca-certificates less nano ripgrep \
 && rm -rf /var/lib/apt/lists/*

# Claude Code als normales npm-Paket. Update = Image neu bauen.
RUN npm install -g @anthropic-ai/claude-code \
 && npm cache clean --force

COPY postfach-hinweis.sh /usr/local/bin/postfach-hinweis
COPY start.sh /usr/local/bin/claude-start
COPY rc-loop.sh /usr/local/bin/rc-loop
COPY CLAUDE.global.md /opt/claude/CLAUDE.global.md
RUN chmod +x /usr/local/bin/postfach-hinweis /usr/local/bin/claude-start /usr/local/bin/rc-loop

RUN mkdir -p /shared && chown node:node /shared
USER node
WORKDIR /home/node
ENV DISABLE_AUTOUPDATER=1
CMD ["claude-start"]
