31 lines
901 B
Docker
31 lines
901 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies, including Rust and build tools
|
|
RUN apt-get update && apt-get install -y \
|
|
libreoffice poppler-utils ffmpeg \
|
|
libpoppler-cpp-dev libmagic1 \
|
|
libffi-dev libssl-dev g++ curl libjpeg-dev zlib1g-dev \
|
|
libxml2-dev libxslt-dev build-essential cargo \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Debug: Verify Rust installation
|
|
RUN rustc --version && cargo --version
|
|
|
|
# Copy application files
|
|
COPY . /app
|
|
|
|
# Copy entrypoint script and make it executable
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# Upgrade pip and install Python dependencies (using piwheels for ARM)
|
|
RUN python -m pip install --upgrade pip && \
|
|
pip install --no-cache-dir --extra-index-url https://www.piwheels.org/simple -r requirements.txt
|
|
|
|
# Expose the application port
|
|
EXPOSE 5000
|
|
|
|
# Use entrypoint script
|
|
ENTRYPOINT ["/entrypoint.sh"] |