Fixed buildx issue
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -45,6 +45,12 @@ RUN mkdir -p /opt/postfix-libs \
|
|||||||
| sort -u \
|
| sort -u \
|
||||||
| xargs -r -I '{}' cp -v --parents '{}' /opt/postfix-libs
|
| 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
|
# Final image
|
||||||
FROM ubuntu:24.04
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
@@ -61,8 +67,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
ssl-cert \
|
ssl-cert \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder /opt/postfix-dist/ /
|
COPY --from=builder /opt/postfix-dist.tar /tmp/postfix-dist.tar
|
||||||
COPY --from=builder /opt/postfix-libs/ /
|
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
|
# Create postfix user and group
|
||||||
RUN groupadd -r postfix \
|
RUN groupadd -r postfix \
|
||||||
|
|||||||
@@ -161,5 +161,4 @@ POSTFIX_SMTPS_TLS_WRAPPERMODE="yes"
|
|||||||
- The container configures `/etc/postfix/main.cf` using `postconf -e`.
|
- The container configures `/etc/postfix/main.cf` using `postconf -e`.
|
||||||
- `/etc/aliases` is created automatically if missing, and `newaliases` is run on startup.
|
- `/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.
|
- `/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.
|
- `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.
|
|
||||||
Reference in New Issue
Block a user