Change base image from CentOS 7 to alpine linux
This commit is contained in:
parent
7099763cec
commit
9fd2173200
4 changed files with 10 additions and 10 deletions
13
Dockerfile
13
Dockerfile
|
@ -1,14 +1,13 @@
|
||||||
#Dockerfile for a Postfix email relay service
|
#Dockerfile for a Postfix email relay service
|
||||||
FROM centos:7
|
FROM alpine
|
||||||
MAINTAINER Juan Luis Baptiste juan.baptiste@gmail.com
|
MAINTAINER Juan Luis Baptiste juan.baptiste@gmail.com
|
||||||
|
|
||||||
RUN yum install -y epel-release && yum update -y && \
|
RUN apk update && \
|
||||||
yum install -y cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5 mailx \
|
apk add bash gawk cyrus-sasl cyrus-sasl-plain cyrus-sasl-crammd5 mailx \
|
||||||
perl supervisor postfix rsyslog \
|
perl supervisor postfix rsyslog \
|
||||||
&& rm -rf /var/cache/yum/* \
|
rm -rf /var/cache/apk/* && \
|
||||||
&& yum clean all
|
mkdir -p /var/log/supervisor/ /var/run/supervisor/ && \
|
||||||
RUN sed -i -e "s/^nodaemon=false/nodaemon=true/" /etc/supervisord.conf
|
sed -i -e 's/inet_interfaces = localhost/inet_interfaces = all/g' /etc/postfix/main.cf
|
||||||
RUN sed -i -e 's/inet_interfaces = localhost/inet_interfaces = all/g' /etc/postfix/main.cf
|
|
||||||
|
|
||||||
COPY etc/ /etc/
|
COPY etc/ /etc/
|
||||||
COPY run.sh /
|
COPY run.sh /
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
postfix:
|
postfix:
|
||||||
|
image: juanluisbaptiste/postfix:dev
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
|
|
@ -22,7 +22,7 @@ nodaemon=true ; (start in foreground if true;default false)
|
||||||
minfds=1024 ; (min. avail startup file descriptors;default 1024)
|
minfds=1024 ; (min. avail startup file descriptors;default 1024)
|
||||||
minprocs=200 ; (min. avail process descriptors;default 200)
|
minprocs=200 ; (min. avail process descriptors;default 200)
|
||||||
;umask=022 ; (process file creation umask;default 022)
|
;umask=022 ; (process file creation umask;default 022)
|
||||||
;user=chrism ; (default is current user, required if root)
|
user=root ; (default is current user, required if root)
|
||||||
;identifier=supervisor ; (supervisord identifier, default is 'supervisor')
|
;identifier=supervisor ; (supervisord identifier, default is 'supervisor')
|
||||||
;directory=/tmp ; (default is not to cd during start)
|
;directory=/tmp ; (default is not to cd during start)
|
||||||
;nocleanup=true ; (don't clean up tempfiles at start;default false)
|
;nocleanup=true ; (don't clean up tempfiles at start;default false)
|
||||||
|
|
4
run.sh
4
run.sh
|
@ -44,7 +44,7 @@ if [ ! -f /etc/postfix/sasl_passwd ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Set header tag
|
#Set header tag
|
||||||
if [ ! -z "${SMTP_HEADER_TAG}" ]; then
|
if [ ! -z "${SMTP_HEADER_TAG}" ]; then
|
||||||
postconf -e "header_checks = regexp:/etc/postfix/header_tag"
|
postconf -e "header_checks = regexp:/etc/postfix/header_tag"
|
||||||
echo -e "/^MIME-Version:/i PREPEND RelayTag: $SMTP_HEADER_TAG\n/^Content-Transfer-Encoding:/i PREPEND RelayTag: $SMTP_HEADER_TAG" > /etc/postfix/header_tag
|
echo -e "/^MIME-Version:/i PREPEND RelayTag: $SMTP_HEADER_TAG\n/^Content-Transfer-Encoding:/i PREPEND RelayTag: $SMTP_HEADER_TAG" > /etc/postfix/header_tag
|
||||||
|
@ -70,4 +70,4 @@ add_config_value "mynetworks" "${nets}"
|
||||||
# starting services
|
# starting services
|
||||||
rm -f /var/spool/postfix/pid/master.pid
|
rm -f /var/spool/postfix/pid/master.pid
|
||||||
|
|
||||||
exec supervisord
|
exec supervisord -c /etc/supervisord.conf
|
||||||
|
|
Loading…
Reference in a new issue