# Use an official Python runtime as a parent image FROM python:3.8-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Install dependencies RUN apt-get update && apt-get install -y \ chromium-driver \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application code COPY . /reptile WORKDIR /reptile # Set environment variables ENV BASE_PAGE_URL="https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=4115&itemUrl=ItemListRightList.html&itemName=%E7%9B%91%E7%AE%A1%E5%88%86%E5%B1%80%E6%9C%AC%E7%BA%A7&itemsubPId=931&itemsubPName=%E8%A1%8C%E6%94%BF%E5%A4%84%E7%BD%9A#382" ENV BASE_URL="https://www.cbirc.gov.cn/cn/view/pages/" ENV DATE_LIMIT="2024-07-24" ENV OUTPUT_PATH_PREFIX="url" # Run the Python script CMD ["python", "scrape.py"]