Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,28 @@ RUN apk add --no-cache \
RUN addgroup -g 1001 claude && \
adduser -u 1001 -G claude -h /home/claude -D claude

# Install bun
# Install bun globally for all users
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
ENV BUN_INSTALL="/root/.bun"

# Install Claude Code CLI globally
# Install Claude Code CLI globally and make it accessible to all users
RUN bun install -g @anthropic-ai/claude-code@1.0.59 && \
ln -sf /root/.bun/bin/claude /usr/local/bin/claude && \
chmod +x /usr/local/bin/claude && \
chmod +x /root/.bun/bin/claude && \
echo "Testing claude command..." && \
/usr/local/bin/claude --version

# Ensure the non-root user can also access bun and claude
# Add to both bashrc and global environment for broader compatibility
RUN echo 'export PATH="/root/.bun/bin:$PATH"' >> /home/claude/.bashrc && \
echo 'export BUN_INSTALL="/root/.bun"' >> /home/claude/.bashrc

# Add environment variables for non-root user access
ENV PATH="/root/.bun/bin:${PATH}" \
BUN_INSTALL="/root/.bun"

# Copy package files
COPY package.json ./
COPY tsconfig.json ./
Expand Down
2 changes: 1 addition & 1 deletion packages/dispatcher/src/kubernetes/job-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ export class KubernetesJobManager {
},
},
],
serviceAccountName: "claude-worker",
serviceAccountName: "peerbot",
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/worker/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ done
echo "🤖 Checking Claude CLI installation..."
if command -v claude >/dev/null 2>&1; then
claude_version=$(timeout 10 claude --version 2>/dev/null || echo "unknown")
echo " ✅ Claude CLI: $version"
echo " ✅ Claude CLI: $claude_version"

# Test Claude CLI basic functionality
if timeout 10 claude --help >/dev/null 2>&1; then
Expand Down Expand Up @@ -150,4 +150,4 @@ echo " - Recovery: ${RECOVERY_MODE:-false}"

# Start the worker process
echo "🚀 Executing Claude Worker..."
exec node /app/dist/index.js
exec bun run dist/index.js
Loading