This commit is contained in:
2021-02-22 00:10:20 +01:00
commit 1589d87b38

32
Dockerfile Normal file
View File

@ -0,0 +1,32 @@
FROM debian:buster
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
LABEL ImageName="registry.hottis.de/dockerized/cron-docker"
ARG SMARTHOST="172.16.11.15"
ARG ADMINUSER="wolfgang.hottgenroth@icloud.com"
ARG APP_DIR="/opt/tools"
RUN \
apt update && \
apt install -y cron && \
apt install -y exim4 && \
sed -i \
-e "s/dc_eximconfig_configtype='local'/dc_eximconfig_configtype='satellite'/" \
-e "s/dc_smarthost=''/dc_smarthost='${SMARTHOST}'/" \
/etc/exim4/update-exim4.conf.conf && \
env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure -f debconf exim4-config && \
echo "root: ${ADMINUSER}" >> /etc/aliases && \
newaliases && \
mkdir -p ${APP_DIR} && \
useradd -d ${APP_DIR} -u 1000 user
USER 1000:1000
WORKDIR ${APP_DIR}
VOLUME /etc/cron.d