# Use an official Python runtime as a parent image FROM python:3.8-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Use Aliyun mirror for apt-get RUN sed -i 's|http://deb.debian.org|http://mirrors.aliyun.com|g' /etc/apt/sources.list # Install dependencies RUN apt-get update && apt-get install -y --fix-missing \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt # Copy the rest of the application code COPY . /reptile2 WORKDIR /reptile2 # Run the Python script CMD ["python", "main_extraction.py"]