From 5789dc2c0b2d45d8904c3a560cbbb9963ffd0239 Mon Sep 17 00:00:00 2001 From: Mike Kusold Date: Thu, 17 Aug 2017 21:57:46 -0600 Subject: [PATCH] Dockerfile to run Shreddit as an hourly cron job --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7ea6ce1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:alpine + +COPY . /shreddit +WORKDIR /shreddit +RUN pip install -r requirements.txt && python setup.py install + +VOLUME /config +WORKDIR /config +RUN echo "0 * * * * cd /config && /usr/local/bin/shreddit >> /dev/stdout" >> /etc/crontabs/root + +CMD ["/usr/sbin/crond", "-l", "2", "-f"]