2026-04-20 15:16:52 +02:00
|
|
|
FROM node:24-alpine
|
2026-04-14 20:11:24 +02:00
|
|
|
|
fix(docker): upgrade npm to remediate 11 HIGH CVEs in bundled dependencies
All findings are in npm's own bundled packages (cross-spawn, glob,
minimatch, tar). Upgrading npm to latest pulls in the patched versions:
- cross-spawn ≥7.0.5 (CVE-2024-21538)
- glob ≥10.5.0 (CVE-2025-64756)
- minimatch ≥9.0.6 (CVE-2026-26996, CVE-2026-27903, CVE-2026-27904)
- tar ≥7.5.11 (CVE-2026-23745, CVE-2026-23950, CVE-2026-24842,
CVE-2026-26960, CVE-2026-29786, CVE-2026-31802)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 15:14:58 +02:00
|
|
|
# Upgrade npm to pull in patched bundled deps (cross-spawn, glob, minimatch, tar)
|
|
|
|
|
# CVEs: CVE-2024-21538, CVE-2025-64756, CVE-2026-26996/27903/27904, CVE-2026-23745/23950/24842/26960/29786/31802
|
2026-04-20 15:15:51 +02:00
|
|
|
RUN npm install -g npm@11.12.1
|
fix(docker): upgrade npm to remediate 11 HIGH CVEs in bundled dependencies
All findings are in npm's own bundled packages (cross-spawn, glob,
minimatch, tar). Upgrading npm to latest pulls in the patched versions:
- cross-spawn ≥7.0.5 (CVE-2024-21538)
- glob ≥10.5.0 (CVE-2025-64756)
- minimatch ≥9.0.6 (CVE-2026-26996, CVE-2026-27903, CVE-2026-27904)
- tar ≥7.5.11 (CVE-2026-23745, CVE-2026-23950, CVE-2026-24842,
CVE-2026-26960, CVE-2026-29786, CVE-2026-31802)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 15:14:58 +02:00
|
|
|
|
2026-04-14 22:40:57 +02:00
|
|
|
# Install runtime dependencies
|
|
|
|
|
RUN apk add --no-cache \
|
2026-04-15 19:18:39 +02:00
|
|
|
git \
|
|
|
|
|
curl \
|
|
|
|
|
ca-certificates \
|
2026-04-15 21:59:08 +02:00
|
|
|
bash
|
2026-04-14 20:11:24 +02:00
|
|
|
|
2026-04-15 08:47:32 +02:00
|
|
|
# Install kubectl — architecture-aware, checksum-verified
|
|
|
|
|
RUN KUBECTL_VERSION=$(curl -fsSL https://dl.k8s.io/release/stable.txt) \
|
2026-04-15 19:18:39 +02:00
|
|
|
&& ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') \
|
|
|
|
|
&& curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" \
|
|
|
|
|
-o /usr/local/bin/kubectl \
|
|
|
|
|
&& curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl.sha256" \
|
|
|
|
|
-o /tmp/kubectl.sha256 \
|
|
|
|
|
&& echo "$(cat /tmp/kubectl.sha256) /usr/local/bin/kubectl" | sha256sum -c \
|
|
|
|
|
&& rm /tmp/kubectl.sha256 \
|
|
|
|
|
&& chmod +x /usr/local/bin/kubectl
|
2026-04-15 08:47:32 +02:00
|
|
|
|
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-15 22:43:00 +02:00
|
|
|
# Install Claude Code stable release
|
2026-04-16 09:48:42 +02:00
|
|
|
RUN curl -fsSL https://claude.ai/install.sh | bash -s stable
|
2026-04-15 19:18:39 +02:00
|
|
|
|
2026-04-14 20:11:24 +02:00
|
|
|
|
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 \
|
2026-04-15 19:18:39 +02:00
|
|
|
@modelcontextprotocol/server-github \
|
|
|
|
|
@yoda.digital/gitlab-mcp-server \
|
|
|
|
|
@aashari/mcp-server-atlassian-jira \
|
|
|
|
|
@aashari/mcp-server-atlassian-confluence
|
2026-04-14 23:09:42 +02:00
|
|
|
|
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 \
|
2026-04-15 19:18:39 +02:00
|
|
|
&& 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"]
|