# Use a base image that supports Python and is suitable for Streamlit FROM python:3.10-slim # Install Tesseract and Poppler (required by pdf2image) using apt-get RUN apt-get update && apt-get install -y \ tesseract-ocr \ libtesseract-dev \ poppler-utils \ && rm -rf /var/lib/apt/lists/* # Copy your requirements file first (for better caching) COPY requirements.txt . # Install Python dependencies, including streamlit RUN pip install --no-cache-dir -r requirements.txt # Set the working directory inside the container WORKDIR /app # Copy the rest of your application code (including app.py, tessdata/, etc.) COPY . . # Expose the port Streamlit runs on (default is 8501) EXPOSE 8501 # Define the command to run your Streamlit app # Use --server.address 0.0.0.0 to allow external connections CMD ["streamlit", "run", "app.py", "--server.address", "0.0.0.0"]