Skip to content

Commit

Permalink
Fix for #172: Change order of parameters for netcat
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed Jan 7, 2024
1 parent 9b2d54f commit df9771b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.2
# syntax=docker/dockerfile:1.6

ARG BASE_IMAGE=debian:bookworm-slim
# ARG BASE_IMAGE=ubuntu:jammy
Expand Down Expand Up @@ -61,7 +61,7 @@ VOLUME [ "/var/spool/postfix", "/etc/postfix", "/etc/opendkim/keys" ]
USER root
WORKDIR /tmp

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD printf "EHLO healthcheck\nquit\n" | { while read l ; do sleep 1; echo $l; done } | nc 127.0.0.1 587 -w 2 | grep -qE "^220.*ESMTP Postfix"
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --start-interval=2s --retries=3 CMD printf "EHLO healthcheck\nquit\n" | { while read l ; do sleep 1; echo $l; done } | nc -w 2 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"

EXPOSE 587
CMD [ "/bin/sh", "-c", "/scripts/run.sh" ]
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ fi
# arg_list="$arg_list --platform linux/amd64,linux/arm64,linux/arm/v7"
#fi

docker buildx build ${arg_list} $* .
set -x
exec docker buildx build ${arg_list} $* .

2 changes: 1 addition & 1 deletion helm/mail/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ readinessProbe:
- -c
- >-
[ ! -f /tmp/container_is_terminating ] &&
printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"
printf "EHLO healthcheck\nquit\n" | { while read l ; do sleep 1; echo $l; done } | nc -w 2 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"
livenessProbe:
initialDelaySeconds: 5
periodSeconds: 5
Expand Down

0 comments on commit df9771b

Please sign in to comment.