simpler healthcheck for postfix

master
Thomas Sänger 6 years ago
parent 0bc901a722
commit a412951a30
No known key found for this signature in database
GPG Key ID: 057DDBB960D5382D

@ -7,11 +7,10 @@ RUN apk add --no-cache postfix postfix-pcre rsyslog \
COPY conf /conf COPY conf /conf
COPY start.py /start.py COPY start.py /start.py
COPY health.sh /health.sh
EXPOSE 25/tcp 10025/tcp EXPOSE 25/tcp 10025/tcp
VOLUME ["/data"] VOLUME ["/data"]
CMD /start.py CMD /start.py
HEALTHCHECK CMD /health.sh HEALTHCHECK CMD echo QUIT|nc localhost 25|grep "220 .* ESMTP Postfix"

@ -1,8 +0,0 @@
#!/bin/sh
if [ "$(echo QUIT|nc localhost 25|tail -n1|cut -f1 -d ' ')" = "221" ]; then
echo "ping successful"
else
echo "ping failed"
exit 1
fi
Loading…
Cancel
Save