-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
79 lines (63 loc) · 2.06 KB
/
Copy pathDockerfile
File metadata and controls
79 lines (63 loc) · 2.06 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Koru - Closed-loop automation across semcod/* repositories
# Multi-stage build for production and testing
#
# Keep floors aligned with pyproject.toml extras (see docs/docker-e2e-testing.md).
# This image is a *queue/CLI* runtime, not a full desktop/noVNC stack.
FROM python:3.12-slim AS base
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
docker.io \
jq \
&& rm -rf /var/lib/apt/lists/*
# Cache bust arg — set to src/ hash by the test fixture to force rebuild on code change
ARG CACHE_BUST=none
# Copy source code first
COPY src/ ./src/
COPY packages/ ./packages/
COPY templates/ ./templates/
COPY docs/ ./docs/
COPY README.md .
COPY LICENSE* .
COPY VERSION .
COPY pyproject.toml .
# Install Python package + extras used by common container e2e (queue, API, desktop bridges).
# Optional quality gates (regix/redup/vallm) and vdisplay are installed as aligned floors;
# they are not a substitute for host Wayland / noVNC desktop validation.
RUN pip install --no-cache-dir -U pip setuptools wheel \
&& pip install --no-cache-dir -e ".[planfile,api,desktop]" \
&& pip install --no-cache-dir \
"planfile>=0.1.117" \
"testql>=1.2.64" \
"wup>=0.2.60" \
"regix>=0.1.0" \
"redup>=0.4.28" \
"vallm>=0.1.87"
# Create non-root user
RUN useradd -m -u 1000 koru && \
chown -R koru:koru /app
USER koru
# Environment variables
ENV PYTHONPATH=/app/src
ENV KORU_AUTOPILOT_IDE=auto
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD koru --version || exit 1
ENTRYPOINT ["koru"]
CMD ["--help"]
# Development stage with test dependencies
FROM base AS development
USER root
RUN pip install --no-cache-dir -e ".[dev,watch,api,planfile,desktop]" && \
chown -R koru:koru /app
USER koru
# Test stage
FROM development AS test
# Copy test files
COPY tests/ ./tests/
# Run tests
RUN python -m pytest tests/ -v -m "not slow and not e2e and not integration" --maxfail=20
# Production stage
FROM base AS production