File size: 588 Bytes
093a5d9 80bcc1a fe7aa8c 3cefa17 80bcc1a fe7aa8c 3cefa17 80bcc1a fe7aa8c 80bcc1a dd0d2ee 80bcc1a fe7aa8c 80bcc1a fe7aa8c 80bcc1a 05c387d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | FROM python:3.11.13
# Install Tesseract OCR and its dependencies
RUN apt-get update \
&& apt-get install -y tesseract-ocr libtesseract-dev libleptonica-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create a new user and switch to it
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=$PATH:/home/user/.local/bin
# Set working directory
WORKDIR $HOME/app
# Copy application files
COPY --chown=user . $HOME/app
CMD ["python", "app.py"]
|