Files
isolated-claude-code/Dockerfile

19 lines
511 B
Docker

FROM node:22-alpine
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=$NPM_CONFIG_PREFIX/bin:$PATH
ENV NODE_ENV=production
ENV CLAUDE_CONFIG_DIR=/home/node/.claude
USER node
WORKDIR /home/node/app
RUN npm install -g @anthropic-ai/claude-code
RUN mkdir -p $CLAUDE_CONFIG_DIR
# Since we destroy the container after exiting, claude code never gets updated.
# Updating at the start making sure its up to date.
ENTRYPOINT ["/bin/sh", "-c", "npm update -g @anthropic-ai/claude-code; claude; exec /bin/sh"]