File tree 4 files changed +29
-1
lines changed
4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,18 @@ FROM tiangolo/uwsgi-nginx-flask:flask-python3.5
3
3
# Remove sample application included in the base image.
4
4
RUN rm /app/main.py /app/uwsgi.ini
5
5
6
+ # Install cron
7
+ RUN apt-get update \
8
+ && apt-get install -y cron \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Install cron job
12
+ COPY crontab /etc/cron.d/libc-update
13
+ RUN chmod 0644 /etc/cron.d/libc-update
14
+ RUN touch /var/log/libcdb.log
15
+
16
+ # Register cron to supervisor
17
+ COPY cron.conf /etc/supervisor/conf.d/cron.conf
18
+
6
19
COPY app /app
7
20
COPY libc-database /libc-database
Original file line number Diff line number Diff line change
1
+ [program:cron]
2
+ command = /usr/sbin/cron -f
3
+ user = root
4
+ autostart = true
5
+
6
+ [program:cron_output]
7
+ command = tail -f /var/log/libcdb.log
8
+ autostart = true
9
+ stdout_logfile=/dev/stdout
10
+ stdout_logfile_maxbytes=0
11
+ stderr_logfile=/dev/stderr
12
+ stderr_logfile_maxbytes=0
Original file line number Diff line number Diff line change
1
+ # Update libc-database every day
2
+ # min hour day mon week user cmd
3
+ 0 12 * * * root cd /libc-database && (./get; echo -n "### Update done "; date) >> /var/log/libcdb.log 2>&1
Original file line number Diff line number Diff line change 1
1
git submodule update --init
2
2
sudo docker build -t libc .
3
- sudo docker run --rm -p31337:80 -it libc
3
+ sudo docker run --name ll -- rm -p31337:80 -it libc
You can’t perform that action at this time.
0 commit comments