- Change executable from claude-code to claude in startup.sh - Fix .env parsing to handle comments using set -a/source - Add explicit PATH for npm global binaries in Dockerfile - Update scratchpad.md with fix documentation
43 lines
1019 B
Docker
43 lines
1019 B
Docker
# ABOUTME: Docker image for Claude Code with Twilio MCP server
|
|
# ABOUTME: Provides autonomous Claude Code environment with SMS notifications
|
|
|
|
FROM node:20-slim
|
|
|
|
# Install required system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
curl \
|
|
python3 \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
# Install Claude Code globally
|
|
RUN npm install -g @anthropic-ai/claude-code
|
|
|
|
# Ensure npm global bin is in PATH
|
|
ENV PATH="/usr/local/bin:${PATH}"
|
|
|
|
# Install Twilio MCP server
|
|
RUN npm install -g @twilio-alpha/mcp
|
|
|
|
# Create directories for configuration
|
|
RUN mkdir -p /app/config /app/.claude
|
|
|
|
# Copy MCP configuration
|
|
COPY config/mcp-config.json /app/config/
|
|
|
|
# Copy startup script
|
|
COPY scripts/startup.sh /app/
|
|
RUN chmod +x /app/startup.sh
|
|
|
|
# Set working directory to mounted volume
|
|
WORKDIR /workspace
|
|
|
|
# Environment variables will be passed from host
|
|
ENV NODE_ENV=production
|
|
|
|
# Start both MCP server and Claude Code
|
|
ENTRYPOINT ["/app/startup.sh"] |