diff --git a/context/Dockerfile b/context/Dockerfile index 32ca6acb9b66d6b4bfca2cc931b5d2d93be25798..73d71ce0450716aa2e0c01bdb2e1c55dccadbf16 100644 --- a/context/Dockerfile +++ b/context/Dockerfile @@ -7,7 +7,9 @@ RUN echo "deb http://security.debian.org/ buster/updates main" >> /etc/apt/sourc RUN apt-get update \ && apt-get -y --no-install-recommends install \ - python3 python3-pip \ + cron \ + python3 \ + python3-pip \ && pip3 install setuptools \ && pip3 install s3cmd \ && s3cmd --version \ @@ -20,5 +22,4 @@ RUN apt-get update \ COPY s3-purge.sh /usr/local/bin/s3-purge COPY crontab /etc/cron.d/s3-purge -RUN touch /var/log/s3-purge -CMD ["tail", "-F", "/var/log/s3-purge"] +CMD ["cron", "-f"] diff --git a/context/crontab b/context/crontab index 21b4156151646725af09a98e382099c30f28699c..06a984db890854f600b6ad6d568162bc5fd208bc 100644 --- a/context/crontab +++ b/context/crontab @@ -1 +1 @@ -20 1 * * * root s3-purge >> /var/log/s3-purge 2>/dev/null +20 1 * * * root s3-purge >> /var/log/s3-purge 2>/var/log/s3-purge-err