creaded correct docker image creation file

This commit is contained in:
DigiServer Developer
2025-11-17 22:03:52 +02:00
parent 2db0033bc0
commit c16383ed75
16 changed files with 1025 additions and 33 deletions

View File

@@ -5,11 +5,13 @@ FROM python:3.13-slim
WORKDIR /app
# Install system dependencies
# Note: LibreOffice is excluded from the base image to reduce size (~500MB)
# It can be installed on-demand via the Admin Panel → System Dependencies
RUN apt-get update && apt-get install -y \
poppler-utils \
libreoffice \
ffmpeg \
libmagic1 \
sudo \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
@@ -36,9 +38,11 @@ ENV FLASK_ENV=production
# Expose port
EXPOSE 5000
# Create a non-root user
# Create a non-root user and grant sudo access for dependency installation
RUN useradd -m -u 1000 appuser && \
chown -R appuser:appuser /app /docker-entrypoint.sh
chown -R appuser:appuser /app /docker-entrypoint.sh && \
echo "appuser ALL=(ALL) NOPASSWD: /app/install_libreoffice.sh" >> /etc/sudoers && \
chmod +x /app/install_libreoffice.sh
USER appuser