d84106e1b4
ODA File Converter handles all DWG versions reliably. Uses xvfb for headless Qt operation in Docker. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
1.1 KiB
Docker
31 lines
1.1 KiB
Docker
FROM ubuntu:24.04
|
|
|
|
# ODA File Converter needs Qt libs + virtual framebuffer for headless mode
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
python3 python3-pip wget ca-certificates \
|
|
xvfb libxcb-xinerama0 libxcb-icccm4 libxcb-image0 \
|
|
libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
|
|
libxcb-shape0 libxcb-xkb1 libxkbcommon0 libxkbcommon-x11-0 \
|
|
libglib2.0-0 libgl1 libfontconfig1 libfreetype6 && \
|
|
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/*
|
|
|
|
# Download and install ODA File Converter
|
|
RUN wget -q "https://download.opendesign.com/guestfiles/Demo/ODAFileConverter_QT6_lnxX64_8.3dll_25.12.deb" \
|
|
-O /tmp/oda.deb && \
|
|
dpkg -i /tmp/oda.deb || apt-get install -f -y && \
|
|
rm /tmp/oda.deb
|
|
|
|
WORKDIR /app
|
|
COPY app.py .
|
|
|
|
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"]
|