-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (54 loc) · 1.96 KB
/
Dockerfile
File metadata and controls
72 lines (54 loc) · 1.96 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
# skill-split Dockerfile
# Multi-stage build for optimal image size
FROM python:3.13-slim as builder
LABEL maintainer="skill-split contributors"
LABEL description="Progressive disclosure for AI documentation"
# Set working directory
WORKDIR /build
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY pyproject.toml ./
COPY README.md ./
RUN pip install --no-cache-dir --user .
# Runtime stage
FROM python:3.13-slim
LABEL maintainer="skill-split contributors"
LABEL description="Progressive disclosure for AI documentation"
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
sqlite3 \
&& rm -rf /var/lib/apt/lists/*
# Copy installed packages from builder
COPY --from=builder /root/.local /root/.local
# Make sure scripts in .local are usable
ENV PATH=/root/.local/bin:$PATH
# Set working directory
WORKDIR /data
# Copy source code
COPY core/ ./core/
COPY handlers/ ./handlers/
COPY models.py ./
COPY skill_split.py ./
# Create volume for database
VOLUME ["/data"]
# Default command
ENTRYPOINT ["python", "skill_split.py"]
CMD ["--help"]
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD python -c "from core.database import Database; db = Database(); exit(0 if db.conn else 1)"
# Metadata
ARG VERSION=1.0.0
ARG BUILD_DATE
ARG VCS_REF
LABEL org.opencontainers.image.title="skill-split"
LABEL org.opencontainers.image.description="Split YAML and Markdown files into searchable SQLite sections"
LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.revision="${VCS_REF}"
LABEL org.opencontainers.image.authors="skill-split contributors"
LABEL org.opencontainers.image.url="https://github.com/user/skill-split"
LABEL org.opencontainers.image.source="https://github.com/user/skill-split"