This commit is contained in:
f 2019-09-27 17:18:41 -03:00
parent a2e27c5316
commit cd03d72e34
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
3 changed files with 20 additions and 0 deletions

View file

@ -1,2 +1,11 @@
FROM sutty/monit:latest
MAINTAINER "f <f@sutty.nl>"
RUN apk add --no-cache opendkim
COPY ./monit.conf /etc/monit.d/opendkim.conf
COPY ./opendkim.sh /usr/local/bin/opendkim
RUN chmod 755 /usr/local/bin/opendkim
RUN install -dm 2750 -o opendkim -g opendkim /run/opendkim
EXPOSE 8891
VOLUME /etc/opendkim

3
monit.conf Normal file
View file

@ -0,0 +1,3 @@
check process opendkim with pidfile /tmp/opendkim.pid
start program = "/usr/local/bin/opendkim start"
stop program = "/usr/local/bin/opendkim stop"

8
opendkim.sh Normal file
View file

@ -0,0 +1,8 @@
#!/bin/sh
pid=/tmp/opendkim.pid
case $1 in
stop) cat ${pid} | xargs kill ;;
*) /usr/sbin/opendkim ;;
esac