-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (38 loc) · 1.25 KB
/
Copy pathDockerfile
File metadata and controls
52 lines (38 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Sawmill Development Container
# Used for sandboxed autonomous development loops
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js for Claude Code CLI
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install Claude Code CLI via npm
RUN npm install -g @anthropic-ai/claude-code
# Create non-root user for safety (do this early so we can set up home dir)
RUN useradd -m -s /bin/bash developer
# Set up working directory
WORKDIR /workspace
# Copy requirements first for layer caching
COPY pyproject.toml ./
COPY README.md ./
# Install Python dependencies
RUN pip install --no-cache-dir textual tomli tomli-w pydantic pytest pytest-asyncio rich-click
# Copy the rest of the project
COPY . .
# Fix ownership
RUN chown -R developer:developer /workspace
# Switch to non-root user
USER developer
# Create .claude directory (will be mounted over at runtime)
RUN mkdir -p /home/developer/.claude
# Set environment variables
ENV PYTHONPATH=/workspace
ENV PYTHONUNBUFFERED=1
ENV HOME=/home/developer
# Default command - can be overridden
CMD ["bash"]