2025-12-24 22:19:43 +01:00
|
|
|
# =============================================================================
|
2025-12-25 07:40:39 +01:00
|
|
|
# Agent Base Image
|
2025-12-24 22:19:43 +01:00
|
|
|
# =============================================================================
|
2025-12-25 07:40:39 +01:00
|
|
|
# Python 3.13 with dev tools for Claude Code agent containers
|
2025-12-24 22:19:43 +01:00
|
|
|
# =============================================================================
|
2025-12-14 22:05:34 +01:00
|
|
|
|
2025-12-25 07:40:39 +01:00
|
|
|
FROM python:3.13-bookworm
|
2025-12-24 22:19:43 +01:00
|
|
|
|
|
|
|
|
# Install Node.js 22 (required for Claude Code CLI)
|
2025-12-14 22:05:34 +01:00
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
curl \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
git \
|
2025-12-24 22:19:43 +01:00
|
|
|
gnupg \
|
|
|
|
|
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
2025-12-14 22:05:34 +01:00
|
|
|
&& apt-get install -y nodejs \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
# Install Claude Code CLI
|
|
|
|
|
RUN npm install -g @anthropic-ai/claude-code
|
|
|
|
|
|
|
|
|
|
# Install uv for Python package management
|
|
|
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
|
|
|
|
|
|
|
|
# Create agent user BEFORE copying files
|
|
|
|
|
RUN useradd -m -s /bin/bash agent
|
|
|
|
|
|
|
|
|
|
# Create app directory and set ownership
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
RUN chown agent:agent /app
|
|
|
|
|
|
|
|
|
|
# Copy MCP server code (needed for agent tools) AS agent
|
|
|
|
|
COPY --chown=agent:agent roboco /app/roboco
|
|
|
|
|
COPY --chown=agent:agent pyproject.toml uv.lock README.md /app/
|
|
|
|
|
|
|
|
|
|
# Switch to agent user for installing dependencies
|
|
|
|
|
USER agent
|
|
|
|
|
|
|
|
|
|
# Install Python dependencies for MCP servers (as agent)
|
2025-12-23 04:39:46 +01:00
|
|
|
ENV UV_HTTP_TIMEOUT=300
|
|
|
|
|
ENV UV_CONCURRENT_DOWNLOADS=4
|
2025-12-14 22:05:34 +01:00
|
|
|
RUN uv python install 3.13 && uv sync --frozen --python 3.13
|
|
|
|
|
|
|
|
|
|
# Claude Code will use mounted ~/.claude for auth
|
2025-12-26 18:01:53 +01:00
|
|
|
# System prompt mounted at /app/system-prompt.md (composed at spawn time from layers)
|
2025-12-14 22:05:34 +01:00
|
|
|
# MCP config generated at runtime
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["claude"]
|