From 5c52e6e32acf5a62c8f95418312f6cb371aec37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lo=C5=A1=C5=A5=C3=A1k?= Date: Sat, 28 Mar 2026 01:06:48 +0100 Subject: [PATCH] Fixed buildx issue --- Dockerfile | 14 ++++++++++++-- README.md | 3 +-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 385bc6c..dea01b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,12 @@ RUN mkdir -p /opt/postfix-libs \ | sort -u \ | xargs -r -I '{}' cp -v --parents '{}' /opt/postfix-libs +RUN cd /opt/postfix-dist \ + && tar -cf /opt/postfix-dist.tar . + +RUN cd /opt/postfix-libs \ + && tar -cf /opt/postfix-libs.tar . + # Final image FROM ubuntu:24.04 @@ -61,8 +67,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ssl-cert \ && rm -rf /var/lib/apt/lists/* -COPY --from=builder /opt/postfix-dist/ / -COPY --from=builder /opt/postfix-libs/ / +COPY --from=builder /opt/postfix-dist.tar /tmp/postfix-dist.tar +COPY --from=builder /opt/postfix-libs.tar /tmp/postfix-libs.tar + +RUN tar -C / -xf /tmp/postfix-dist.tar \ + && tar -C / -xf /tmp/postfix-libs.tar \ + && rm -f /tmp/postfix-dist.tar /tmp/postfix-libs.tar # Create postfix user and group RUN groupadd -r postfix \ diff --git a/README.md b/README.md index e94a249..c63b468 100644 --- a/README.md +++ b/README.md @@ -161,5 +161,4 @@ POSTFIX_SMTPS_TLS_WRAPPERMODE="yes" - The container configures `/etc/postfix/main.cf` using `postconf -e`. - `/etc/aliases` is created automatically if missing, and `newaliases` is run on startup. - `/etc/resolv.conf` is copied into `/var/spool/postfix/etc/resolv.conf` so DNS lookups work in chrooted Postfix services. -- `POSTFIX_SMTPD_MILTERS` and `POSTFIX_NON_SMTPD_MILTERS` should contain only `host:port`. The script adds the `inet:` prefix automatically. -- TLS certificate and key files must exist inside the container if TLS is enabled. \ No newline at end of file +- `POSTFIX_SMTPD_MILTERS` and `POSTFIX_NON_SMTPD_MILTERS` should contain only `host:port`. The script adds the `inet:` prefix automatically. \ No newline at end of file