FROM mcr.microsoft.com/dotnet/aspnet:8.0 WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ python3 \ python3-pip \ python3-venv \ libreoffice-core \ libreoffice-writer \ libreoffice-calc \ libreoffice-impress \ ghostscript \ tesseract-ocr \ tesseract-ocr-eng \ poppler-utils \ libglib2.0-0 \ libpango-1.0-0 \ libpangocairo-1.0-0 \ libcairo2 \ libgdk-pixbuf2.0-0 \ && rm -rf /var/lib/apt/lists/* # Setup Python virtual environment and install deps COPY tools/python/requirements.txt /tmp/requirements.txt RUN python3 -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" RUN pip install --no-cache-dir -r /tmp/requirements.txt && rm /tmp/requirements.txt # Copy published .NET app (pre-compiled, no source code) COPY . . # Create directories for file processing RUN mkdir -p /app/uploads /app/converted && \ chmod -R 777 /app/uploads /app/converted ENV ASPNETCORE_URLS=http://+:7860 ENV PORT=7860 ENV DOTNET_RUNNING_IN_CONTAINER=true EXPOSE 7860 ENTRYPOINT ["dotnet", "PDFConverter_Razor.dll"]