File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1- FROM python:3.12-slim
1+ # Builder stage
2+ FROM python:3.12-slim-bookworm AS builder
23
3- RUN apt-get update && apt-get install -y \
4+ RUN apt-get update && apt-get install -y --no-install-recommends \
45 libglib2.0-0 \
56 && rm -rf /var/lib/apt/lists/*
67
78RUN pip install flask
89
9- COPY wcocr.cpython-312-x86_64-linux-gnu.so /app/wcocr.cpython-312-x86_64-linux-gnu.so
10+ # Final stage
11+ FROM python:3.12-slim-bookworm
1012
11- COPY wx /app/wx
13+ RUN apt-get update && apt-get install -y --no-install-recommends \
14+ libglib2.0-0 \
15+ && rm -rf /var/lib/apt/lists/*
16+
17+ RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
18+
19+ COPY --from=builder /app/wcocr.cpython-312-x86_64-linux-gnu.so /app/wcocr.cpython-312-x86_64-linux-gnu.so
20+ COPY --from=builder /app/wx /app/wx
1221
1322COPY main.py /app/main.py
1423COPY templates /app/templates
1524
1625WORKDIR /app
1726
18- CMD ["python" , "main.py" ]
27+ CMD ["python" , "main.py" ]
Original file line number Diff line number Diff line change 1+ flask
You can’t perform that action at this time.
0 commit comments