cc-solver / Dockerfile
VeryOnly123's picture
auto
5c3badd
Raw History Blame Contribute Delete
1.17 kB
FROM node:18-slim
# Install Python3, pip
RUN apt-get update && apt-get install -y python3 python3-pip && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt
# Global install Claude Code CLI
RUN npm install -g @anthropic-ai/claude-code
# Copy web app files only (solver files are fetched from GitHub at runtime)
COPY app.py solver.py /app/
COPY static/ /app/static/
# Create workspaces directory
RUN mkdir -p /app/workspaces
# Create non-root user (claude CLI refuses to run as root)
RUN useradd -m -s /bin/bash solver
RUN mkdir -p /home/solver/.claude
COPY settings.json /home/solver/.claude/settings.json
RUN chown -R solver:solver /home/solver/.claude
RUN chown -R solver:solver /app
EXPOSE 7860
USER solver
ENV HOME=/home/solver
ENV PATH="/usr/local/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ENV PYTHONUNBUFFERED=1
# Default: fetch solver files from this GitHub repo at startup
ENV SOLVER_REPO_URL="https://github.com/Usami-Mira/CC_Integrater/raw/refs/heads/main/"
CMD ["python3", "/app/app.py"]