Dockerfile 324 B

123456789101112131415
  1. FROM registry.cn-hangzhou.aliyuncs.com/hexiaoshi/python:3.10
  2. RUN apt-get update && apt-get -y install cron vim
  3. WORKDIR /app
  4. COPY . /app/
  5. RUN mv /app/crontab /etc/cron.d/crontab && chmod 0644 /etc/cron.d/crontab \
  6. && /usr/bin/crontab /etc/cron.d/crontab && pip install -r requirements.txt
  7. CMD ["cron", "-f"]