-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (32 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
44 lines (32 loc) · 1.19 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
# Code2Logic Docker Image
# Multi-stage build for smaller image
FROM python:3.12-slim AS builder
WORKDIR /app
# Install build dependencies
RUN pip install --no-cache-dir build
# Copy source code
COPY pyproject.toml README.md LICENSE CHANGELOG.md ./
COPY code2logic/ ./code2logic/
# Build wheel
RUN python -m build --wheel
# ============================================================================
# Final image
# ============================================================================
FROM python:3.12-slim
LABEL maintainer="Softreck <info@softreck.dev>"
LABEL description="Code2Logic - Convert source code to logical representation for LLM analysis"
LABEL version="1.0.1"
WORKDIR /app
# Install the wheel with all dependencies
COPY --from=builder /app/dist/*.whl /tmp/
RUN pip install --no-cache-dir /tmp/*.whl[full] && \
rm /tmp/*.whl
# Create volume mount points
VOLUME ["/project", "/output"]
# Default command
ENTRYPOINT ["code2logic"]
CMD ["--help"]
# Usage examples:
# docker build -t code2logic .
# docker run -v /path/to/project:/project -v /path/to/output:/output code2logic /project -f csv -o /output/analysis.csv
# docker run -v $(pwd):/project code2logic /project -f json --flat