1b27f111a9
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
604 B
Docker
23 lines
604 B
Docker
FROM ubuntu:24.04
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
python3 python3-pip libredwg-tools && \
|
|
pip3 install --no-cache-dir --break-system-packages flask && \
|
|
apt-get purge -y python3-pip && \
|
|
apt-get autoremove -y && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
COPY app.py .
|
|
|
|
RUN useradd --system --no-create-home converter
|
|
USER converter
|
|
|
|
EXPOSE 5001
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
|
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:5001/health')" || exit 1
|
|
|
|
CMD ["python3", "app.py"]
|