forked from dwmkerr/claude-code-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
64 lines (54 loc) · 2.88 KB
/
Dockerfile.base
File metadata and controls
64 lines (54 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM node:20-slim
# Install system tools: git, curl, networking tools
RUN apt-get update && apt-get install -y \
git \
curl \
net-tools \
procps \
ca-certificates \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install Docker CLI from official Docker repo (newer than docker.io package)
RUN install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \
chmod a+r /etc/apt/keyrings/docker.asc && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable" \
> /etc/apt/sources.list.d/docker.list && \
apt-get update && apt-get install -y docker-ce-cli && \
rm -rf /var/lib/apt/lists/*
# Install GitHub CLI
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list \
&& apt-get update && apt-get install -y gh \
&& rm -rf /var/lib/apt/lists/*
# Install kubectl, helm, devspace, kind
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(dpkg --print-architecture)/kubectl" \
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \
&& rm kubectl
RUN ARCH=$(dpkg --print-architecture) && \
curl -fsSL https://get.helm.sh/helm-v3.16.3-linux-${ARCH}.tar.gz | tar xz -C /tmp && \
mv /tmp/linux-${ARCH}/helm /usr/local/bin/helm && \
rm -rf /tmp/linux-${ARCH}
RUN curl -fsSL https://github.com/devspace-sh/devspace/releases/latest/download/devspace-linux-$(dpkg --print-architecture) -o /usr/local/bin/devspace \
&& chmod +x /usr/local/bin/devspace
RUN curl -Lo /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v0.25.0/kind-linux-$(dpkg --print-architecture) \
&& chmod +x /usr/local/bin/kind
# Install Claude Code CLI
RUN npm install -g @anthropic-ai/claude-code
# Pre-install Playwright system dependencies and Chromium browser as root.
# Chrome is not available for Linux ARM64, so we use Chromium which has cross-platform support.
RUN npx playwright install-deps chromium && \
npx playwright install chromium
# Pre-cache Playwright MCP server
RUN npx @playwright/mcp@latest --help || true
# Create claude-code-agent user with required directories
RUN adduser --system --uid 1001 --home /home/claude-code-agent claude-code-agent && \
mkdir -p /home/claude-code-agent/.claude/debug && \
mkdir -p /.devspace && \
chown -R claude-code-agent:nogroup /home/claude-code-agent /.devspace
WORKDIR /app
RUN mkdir -p /workspace && chown -R claude-code-agent:nogroup /app /workspace
USER claude-code-agent
ENV HOME=/home/claude-code-agent