-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4 ARM64 image broken #147
Comments
That was fast. It's not even out of the oven yet. I'll check it out. |
I cannot reproduce this issue.
|
I can reproduce this on the NEVERMIND: I also get this on the
|
Works on my machine using the following command:
How are you running it, what's your |
Uname is:
It's Ampere ARM64 in Oracle Cloud. When I run:
on that machine, I dont see the error. So it must have something to do with a setting in the compose-file? |
I'll try running this directly on another ARM machine. I'm running this natively on ARM mac and it works. |
With your command it works.. but with this compose: postfix:
hostname: postfix
container_name: postfix
image: "boky/postfix:v4.0.0"
environment:
- "HOSTNAME=domain.tld"
- "TZ=Europe/Amsterdam"
- "MYNETWORKS=0.0.0.0/0,[::]/0"
- "ALLOW_EMPTY_SENDER_DOMAINS=true"
- "RELAYHOST=xxx:587"
- "RELAYHOST_USERNAME=xxxx"
- "RELAYHOST_PASSWORD=xxxx"
volumes:
- "/mnt/data/postfix/etc:/etc/postfix"
- "/mnt/data/postfix/spool:/var/spool/postfix"
- "/mnt/data/postfix/keys:/etc/opendkim/keys"
ports:
- 25:25
networks:
- web
restart: always
stop_grace_period: 2m It does not.. So maybe setting the RELAYHOST variable is causing it? |
That shouldn't be an issue. It works for me, though, if I try to run it directly from the command line with your variables:
|
Same problem with amd64 build and latest tag
|
Could this be because of the use of |
@undefinedid No... I experienced and reported this problem already before the move to But a quick solution for you would be to use the |
#149 was about changing But I think it does with switch from
I don't think that it's an issue with the image, but with existing (Alpine-based) configuration. I see above that @kroese has Can you @undefinedid and @kroese check or maybe even share your configs, so we find in which setting folder appears? |
@bokysan That must be it! In
That is the same directory it complains about when starting. Is it safe to just remove all the files inside the |
I can confirm that switching to As @kroese said, It seems that this is the default Postfix config file, created at first launch of the container, in which custom settings are written at the very end of the file via the container environment variables. Do you need a specific config or Compose file to help fix this issue? |
Can you check the latest edge, plese? It includes a fix for this issue, but I haven't been able to test it properly just yet. If it does work, I'll release |
I'm note sure but it seems
My
Sending mail still works and stack is seen "healthy". Here is the full log:
|
This image will now automatically reconfigure `daemon_directory` in case of distrubution switching. Alpine and Debian/Ubuntu will use different directly layout and if the user persists `/etc/postfix`, this image will not start if the distribution changes.
This should work now with |
I think there may have been a regression here. I'm seeing this happening again starting with v4.0.4. But if I downgrade to 4.0.3 the problem disappears. |
That sounds really odd. These were literary the only changes between diff --git a/Dockerfile b/Dockerfile
index bf92c5a..ae4c04f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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
@@ -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" ]
diff --git a/build.sh b/build.sh
index 280104e..17814fc 100755
--- a/build.sh
+++ b/build.sh
@@ -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} $* .
diff --git a/helm/mail/values.yaml b/helm/mail/values.yaml
index 2efa6a9..32b9ba9 100644
--- a/helm/mail/values.yaml
+++ b/helm/mail/values.yaml
@@ -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 |
@joekrill How exactly are you starting the image? |
Sorry, I should clarify - the error I'm seeing is slightly different, so this may be a different issue. I'm seeing the same message as the one in this comment above - which is why I initially thought it was the same issue:
But I'm not seeing the The full output:
I'm using the Helm chart to start this in a Kubernetes cluster. These are the values I'm using: fullnameOverride: smtp
metrics:
enabled: true
serviceMonitor:
enabled: false
labels:
release: prometheus-stack
existingSecret: smtp-settings
config:
general:
ALLOWED_SENDER_DOMAINS: mydomain.com
service:
port: 25 And the If I downgrade to 4.0.3 the problem goes away. So perhaps it instead has something to do with the loop in the healthcheck causing the startup to hang? |
Quits with:
fatal: chdir(/usr/libexec/postfix): No such file or directory
The text was updated successfully, but these errors were encountered: