Add Dockerfile
This commit is contained in:
parent
16438a138d
commit
1f62619239
1 changed files with 24 additions and 0 deletions
24
Dockerfile
Normal file
24
Dockerfile
Normal file
|
@ -0,0 +1,24 @@
|
|||
ARG VERSION=3.20.6
|
||||
FROM git.h2-invent.com/public-system-design/alpine-php8-webserver:${VERSION}
|
||||
|
||||
USER root
|
||||
|
||||
RUN wget https://github.com/aptible/supercronic/releases/download/v0.2.33/supercronic-linux-amd64 -O /supercronic \
|
||||
&& chmod +x /supercronic
|
||||
|
||||
RUN wget https://git.h2-invent.com/Public-System-Design/Public-Helperscripts/raw/branch/main/distributed_cron.sh -O /distributed_cron.sh \
|
||||
&& chmod +x /distributed_cron.sh
|
||||
|
||||
RUN mkdir /etc/service/cron \
|
||||
&& echo "#!/bin/sh" > /etc/service/cron/run \
|
||||
&& echo "exec 2>&1 /supercronic /var/crontab" >> /etc/service/cron/run \
|
||||
&& chown -R nobody:nobody /etc/service/cron \
|
||||
&& chmod -R +x /etc/service/cron
|
||||
|
||||
RUN echo "# Docker Cron Jobs" > /var/crontab \
|
||||
&& echo "SHELL=/bin/sh" >> /var/crontab \
|
||||
&& echo "TZ=Europe/Berlin" >> /var/crontab \
|
||||
&& echo "" >> /var/crontab \
|
||||
&& chown nobody:nobody /var/crontab
|
||||
|
||||
USER nobody
|
Loading…
Add table
Reference in a new issue