This commit is contained in:
Wolfgang Hottgenroth
2022-07-20 12:55:10 +02:00
commit 66287f4049
3 changed files with 30 additions and 0 deletions

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM debian:bullseye
ARG APP_DIR="/opt/app"
RUN \
apt update && \
apt install -y cron && \
mkdir -p ${APP_DIR} && \
useradd -d ${APP_DIR} -u 1000 user
COPY crontab /etc/
COPY testscript.sh ${APP_DIR}/
# USER 1000:1000
WORKDIR ${APP_DIR}
CMD [ "/usr/sbin/cron", "-f" ]

2
crontab Normal file
View File

@ -0,0 +1,2 @@
*/2 * * * * user /opt/app/testscript.sh

5
testscript.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
date > /tmp/date.log