From 934f6fe726817b989a9e5f6ebcb773241559e7de Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 5 Apr 2018 14:04:28 +0200 Subject: [PATCH] Upgrade Postfix to 3.3, supporting foreground start --- postfix/Dockerfile | 6 ++++-- postfix/docker/etc/services.d/postfix/run | 8 ++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/postfix/Dockerfile b/postfix/Dockerfile index d49f20a..12ea906 100644 --- a/postfix/Dockerfile +++ b/postfix/Dockerfile @@ -5,8 +5,10 @@ RUN \ # Create OS user (which will be picked up later by apk add) addgroup -S -g 587 postfix \ && adduser -S -u 587 -h /var/spool/postfix -s /bin/false -g postfix -G postfix postfix \ - # Install Postfix - && apk --no-cache add ca-certificates postfix s6 \ + # Add edge/main repository + && echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/main' >>/etc/apk/repositories \ + # Install Postfix 3.3 + && apk --no-cache add ca-certificates postfix@edge s6 \ # Build aliases database && newaliases \ # Cleanup diff --git a/postfix/docker/etc/services.d/postfix/run b/postfix/docker/etc/services.d/postfix/run index b47dc8f..dead385 100755 --- a/postfix/docker/etc/services.d/postfix/run +++ b/postfix/docker/etc/services.d/postfix/run @@ -1,7 +1,3 @@ -#!/bin/sh +#!/bin/execlineb -P -/usr/sbin/postfix -c /etc/postfix start - -while kill -0 $(cat /var/spool/postfix/pid/master.pid) 2>/dev/null; do - sleep 1 -done +/usr/sbin/postfix -c /etc/postfix start-fg