FROM alpine:3.14 as builder RUN apk add --no-cache \ g++ \ make \ libmilter-dev \ spamassassin-client RUN mkdir /tmp/spamass-milter RUN wget -qO- https://download.savannah.gnu.org/releases/spamass-milt/spamass-milter-0.4.0.tar.gz | tar -xz -C /tmp/spamass-milter --strip 1 WORKDIR /tmp/spamass-milter RUN ./configure && make FROM thallian/confd-env:latest COPY --from=builder /tmp/spamass-milter/spamass-milter /bin/spamass-milter RUN apk add --no-cache \ postfix \ postfix-pgsql \ openssl \ libstdc++ \ libmilter RUN addgroup -g 2222 access RUN addgroup postfix access RUN chown root /var/spool/postfix/ RUN chown root /var/spool/postfix/pid EXPOSE 25 587 ADD /rootfs /