using cron in docker

main
Heiner Tholen 2022-11-27 19:31:34 +01:00
parent 95370fec3a
commit d5f34b710e
1 changed files with 8 additions and 1 deletions

View File

@ -6,9 +6,16 @@ ENV PATH="/root/.local/bin:${PATH}"
WORKDIR /srv
RUN apt-get update -qq
RUN apt-get update -qq && \
apt-get install -y cron
RUN pip install --default-timeout=200 --upgrade pip==22.3.1 && \
pip install feed2toot==0.17 && \
pip install wheel==0.38.4
RUN echo "@hourly feed2toot -c /data/feed2toot.ini \n" > /etc/cron.d/feed2toot && \
crontab /etc/cron.d/feed2toot && \
touch /var/log/feed2toot.log
CMD cron && tail -f /var/log/feed2toot.log