Skip to content

Commit 2054977

Browse files
zzstoatzzclaude
andauthored
fix: install claude code CLI in slackbot docker image (#1247)
adds bun and nodejs to the docker image to support the claude agent sdk's CLI dependency. the SDK requires the @anthropic-ai/claude-code package which we install globally with bun and add to PATH. changes: - copy bun binary from official oven/bun image - install nodejs 20.x from nodesource - install @anthropic-ai/claude-code globally via bun - add /root/.bun/bin to PATH for CLI access fixes the CLINotFoundError when research_agent.py tries to use ClaudeSDKClient 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent f2e5280 commit 2054977

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

examples/slackbot/Dockerfile.slackbot

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
FROM python:3.13-slim
22

33
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
4+
COPY --from=oven/bun:latest /usr/local/bin/bun /usr/local/bin/bun
45

56
WORKDIR /app
67

78
COPY . /app
89

910
RUN apt-get update && \
1011
apt-get install -y git build-essential curl && \
12+
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
13+
apt-get install -y nodejs && \
1114
apt-get clean && \
1215
rm -rf /var/lib/apt/lists/*
1316

14-
RUN uv sync --extra slackbot --no-dev
17+
RUN uv sync --extra slackbot --no-dev
18+
19+
RUN bun install -g @anthropic-ai/claude-code
20+
21+
ENV PATH="/root/.bun/bin:${PATH}"
1522

1623
EXPOSE 4200
1724

0 commit comments

Comments
 (0)