2026-04-14 22:40:57 +02:00
|
|
|
FROM node:20-alpine
|
2026-04-14 20:11:24 +02:00
|
|
|
|
2026-04-14 22:40:57 +02:00
|
|
|
# Install runtime dependencies
|
|
|
|
|
RUN apk add --no-cache \
|
2026-04-14 20:11:24 +02:00
|
|
|
git \
|
|
|
|
|
curl \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
bash \
|
2026-04-14 22:40:57 +02:00
|
|
|
ttyd
|
2026-04-14 20:11:24 +02:00
|
|
|
|
2026-04-14 22:25:38 +02:00
|
|
|
# Entrypoint used by the webui service (ttyd wrapping claude)
|
|
|
|
|
COPY --chmod=755 webui-entrypoint.sh /usr/local/bin/webui-entrypoint.sh
|
|
|
|
|
|
2026-04-14 22:55:02 +02:00
|
|
|
# System-level Claude Code policy — owned by root, not writable by the node user.
|
|
|
|
|
# Restricts available models; cannot be bypassed via CLI flags or env vars.
|
2026-04-14 22:59:25 +02:00
|
|
|
COPY settings.json /etc/claude-code/managed-settings.json
|
2026-04-14 22:55:02 +02:00
|
|
|
|
2026-04-14 22:50:59 +02:00
|
|
|
# Install Claude Code globally
|
2026-04-14 20:11:24 +02:00
|
|
|
RUN npm install -g @anthropic-ai/claude-code
|
|
|
|
|
|
2026-04-14 23:09:42 +02:00
|
|
|
# Install MCP servers globally — entry points land in /usr/local/lib/node_modules/
|
|
|
|
|
RUN npm install -g \
|
|
|
|
|
@modelcontextprotocol/server-github \
|
|
|
|
|
@yoda.digital/gitlab-mcp-server \
|
|
|
|
|
@aashari/mcp-server-atlassian-jira \
|
|
|
|
|
@aashari/mcp-server-atlassian-confluence
|
|
|
|
|
|
2026-04-14 22:50:59 +02:00
|
|
|
# Workspace and Claude config dir — owned by the built-in node user (uid 1000).
|
2026-04-14 22:47:04 +02:00
|
|
|
# Pre-creating ~/.claude ensures the named volume is initialised with the
|
|
|
|
|
# correct ownership when first mounted (Docker copies image content into
|
|
|
|
|
# an empty named volume on first use).
|
2026-04-14 22:50:59 +02:00
|
|
|
RUN mkdir -p /workspace /home/node/.claude \
|
|
|
|
|
&& chown -R node:node /workspace /home/node/.claude
|
2026-04-14 20:11:24 +02:00
|
|
|
|
2026-04-14 22:50:59 +02:00
|
|
|
USER node
|
2026-04-14 20:11:24 +02:00
|
|
|
WORKDIR /workspace
|
|
|
|
|
|
|
|
|
|
# Proxy traffic through sidecar — override at runtime if needed
|
|
|
|
|
ENV HTTP_PROXY=http://proxy:3128
|
|
|
|
|
ENV HTTPS_PROXY=http://proxy:3128
|
|
|
|
|
ENV ALL_PROXY=http://proxy:3128
|
|
|
|
|
ENV NO_PROXY=localhost,127.0.0.1
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["claude"]
|