cc652dc5af
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
755 B
Docker
26 lines
755 B
Docker
FROM ubuntu:24.04
|
|
|
|
# Enable universe repo (libredwg-tools lives there)
|
|
RUN sed -i 's/Components: main/Components: main universe/' /etc/apt/sources.list.d/ubuntu.sources
|
|
|
|
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"]
|