Dockerfile 277 B

12345678910
  1. FROM python:3.9
  2. RUN apt-get update && apt-get -y install cron vim
  3. WORKDIR /app
  4. COPY crontab /etc/cron.d/crontab
  5. COPY hello.py /app/hello.py
  6. RUN chmod 0644 /etc/cron.d/crontab
  7. RUN /usr/bin/crontab /etc/cron.d/crontab
  8. # run crond as main process of container
  9. CMD ["cron", "-f"]