Enables Ralph to run inside a Docker container for Windows users (via Docker Desktop) and anyone preferring containerized execution. New files: - Dockerfile (Debian slim + Node.js 20 + all Ralph dependencies) - docker-compose.yml for easy startup - docker/docker-entrypoint.sh with UID/GID remapping - docker/ralph-docker (bash wrapper) and ralph-docker.ps1 (PowerShell) - .gitattributes to prevent Windows CRLF line ending corruption - .dockerignore for clean build context - .github/workflows/docker.yml CI workflow - docs/user-guide/04-docker-setup.md comprehensive documentation Updated: README.md, CLAUDE.md, docs/user-guide/README.md, .gitignore https://claude.ai/code/session_01SNzxUdH1Udf26rN3RKNNzu
46 lines
1.1 KiB
Docker
46 lines
1.1 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
# System dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
bash \
|
|
jq \
|
|
git \
|
|
tmux \
|
|
coreutils \
|
|
curl \
|
|
ca-certificates \
|
|
gosu \
|
|
procps \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Node.js 20 LTS
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
&& apt-get install -y --no-install-recommends nodejs \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Claude Code CLI globally
|
|
RUN npm install -g @anthropic-ai/claude-code
|
|
|
|
# Create ralph user
|
|
RUN groupadd -g 1000 ralph \
|
|
&& useradd -m -u 1000 -g ralph -s /bin/bash ralph
|
|
|
|
# Copy Ralph source
|
|
COPY . /opt/ralph-claude-code/
|
|
|
|
# Install Ralph as the ralph user
|
|
USER ralph
|
|
RUN cd /opt/ralph-claude-code && bash install.sh
|
|
ENV PATH="/home/ralph/.local/bin:${PATH}"
|
|
|
|
# Switch back to root for entrypoint (handles UID remapping)
|
|
USER root
|
|
|
|
# Copy entrypoint
|
|
COPY docker/docker-entrypoint.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
WORKDIR /workspace
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
CMD ["ralph", "--help"]
|