FROM python:3.9-slim WORKDIR /app COPY requirements.txt /app RUN pip install --no-cache-dir -r requirements.txt RUN apt-get update && apt-get install --assume-yes \ cron \ && rm -rf /var/lib/apt/lists/* COPY . /app RUN (echo "SHELL=/bin/bash" > /etc/cron.d/fetch_crl_cron) RUN (echo "BASH_ENV=/app/.env" >> /etc/cron.d/fetch_crl_cron) RUN (echo "* * * * * root /usr/local/bin/python3 /app/app.py >> /var/log/cron.log 2>&1" >> /etc/cron.d/fetch_crl_cron) RUN touch /var/log/cron.log CMD printenv > /etc/environment && cron && tail -f /var/log/cron.log