From dd3f431d2f20409ccb490241e70687a5f5c7c79c Mon Sep 17 00:00:00 2001 From: jwansek Date: Sun, 27 Apr 2025 21:18:34 +0100 Subject: Added caching docker info with cron --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index ec1b310..f81f901 100755 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,12 @@ MAINTAINER Eden Attenborough "eden.attenborough@outlook.com" ENV TZ=Europe/London RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update -y -RUN apt-get install -y python3-pip python3-dev build-essential clang libffi-dev libxml2-dev libxslt-dev libjpeg-dev zlib1g-dev +RUN apt-get install -y python3-pip python3-dev build-essential clang libffi-dev libxml2-dev libxslt-dev libjpeg-dev zlib1g-dev tmux cron COPY . /app WORKDIR /app RUN pip3 install -r requirements.txt -ENTRYPOINT ["python3"] -CMD ["app.py", "--production"] + +RUN echo "*/30 * * * * root python3 /app/cache.py > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/crontab + +ENTRYPOINT ["bash"] +CMD ["entrypoint.sh"] -- cgit v1.2.3