FROM python:3.10-slim # Install system dependencies RUN apt-get update && apt-get install -y \ tesseract-ocr \ tesseract-ocr-deu \ cron \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy project files COPY . /app # Install Python packages RUN pip install --no-cache-dir -r requirements.txt # Set environment variables ENV PYTHONUNBUFFERED=1 # Set up cron job RUN echo "10 7 * * * bash /app/run_citysensor.sh >> /app/logs/cron.log 2>&1" > citysensor-cron \ && crontab citysensor-cron # Make shell script executable RUN chmod +x /app/run_citysensor.sh # Start cron in foreground CMD ["cron", "-f"]