Skip to content

Commit df9771b

Browse files
committed
Fix for #172: Change order of parameters for netcat
1 parent 9b2d54f commit df9771b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# syntax=docker/dockerfile:1.2
1+
# syntax=docker/dockerfile:1.6
22

33
ARG BASE_IMAGE=debian:bookworm-slim
44
# ARG BASE_IMAGE=ubuntu:jammy
@@ -61,7 +61,7 @@ VOLUME [ "/var/spool/postfix", "/etc/postfix", "/etc/opendkim/keys" ]
6161
USER root
6262
WORKDIR /tmp
6363

64-
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"
64+
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"
6565

6666
EXPOSE 587
6767
CMD [ "/bin/sh", "-c", "/scripts/run.sh" ]

build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ fi
4141
# arg_list="$arg_list --platform linux/amd64,linux/arm64,linux/arm/v7"
4242
#fi
4343

44-
docker buildx build ${arg_list} $* .
44+
set -x
45+
exec docker buildx build ${arg_list} $* .
4546

helm/mail/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ readinessProbe:
211211
- -c
212212
- >-
213213
[ ! -f /tmp/container_is_terminating ] &&
214-
printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"
214+
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"
215215
livenessProbe:
216216
initialDelaySeconds: 5
217217
periodSeconds: 5

0 commit comments

Comments
 (0)