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 20:11:24 +02:00
|
|
|
# Create non-root user
|
2026-04-14 22:40:57 +02:00
|
|
|
RUN addgroup -g 1000 claude \
|
|
|
|
|
&& adduser -u 1000 -G claude -s /bin/bash -D claude
|
2026-04-14 20:11:24 +02:00
|
|
|
|
|
|
|
|
# Install Claude Code globally (runs as root for npm -g, then drops)
|
|
|
|
|
RUN npm install -g @anthropic-ai/claude-code
|
|
|
|
|
|
|
|
|
|
# Workspace directory owned by claude user
|
|
|
|
|
RUN mkdir -p /workspace && chown claude:claude /workspace
|
|
|
|
|
|
|
|
|
|
USER claude
|
|
|
|
|
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"]
|