Files
container-postfix/Dockerfile
T
unkin-agent 8736092555
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
Scaffold postfix smarthost image
2026-10-12 00:32:49 +11:00

29 lines
949 B
Docker

ARG REGISTRY=artifactapi.k8s.syd1.au.unkin.net/docker-internal
# The container-base release this image is built on — the one place to bump it.
ARG BASE_VERSION=0.2.1
ARG BASE_IMAGE_NAME=almalinux9
FROM ${REGISTRY}/${BASE_IMAGE_NAME}:${BASE_VERSION} AS image
ARG DISTRO=alma9
COPY distros/${DISTRO}/ /tmp/distro/
# DL3041: versions are pinned by the estate dnf repos, not here. SC2086: $PACKAGES is a
# word list on purpose.
# hadolint ignore=DL3041,SC2086
RUN set -eux; \
. /tmp/distro/distro.env; \
dnf install -y $PACKAGES; \
dnf clean all; \
postconf -e maillog_file=/dev/stdout; \
rm -rf /var/cache/dnf /tmp/distro
VOLUME ["/var/spool/postfix"]
EXPOSE 25
CMD ["postfix", "start-fg"]
# Never pushed: building it runs the smoke test, so a failure fails the build.
FROM image AS test
# hadolint ignore=DL3041
RUN dnf install -y swaks openssl perl-IO-Socket-SSL && dnf clean all
COPY test/ /tmp/test/
RUN /tmp/test/smoke.sh