1052: Upgrade alpine to 3.10 r=mergify[bot] a=Nebukadneza

## What type of PR?
enhancement / bug-fix

## What does this PR do?
Upgrade the alpine base image to 3.10 and clean up ensuing problems. Also directly uses postfix foreground-running with stdout logging.

### Related issue(s)
closes #1049
closes #1051

Note: This is a duplicate effort of #1050 #1039 …

## Prerequistes
- [X] In case of feature or enhancement: documentation updated accordingly
- [X] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file.

With these images, I have tested manually:
- Email receive to user
  - on main domain
  - on additional domain
  - via an alias on main-domain
  - via an alias on additional domain
  - via catchall
- Email reject
  - of eicar testfiles
- Email sending
- Fetchmail from legacy POP
- Front LE certificates
- Simple overriding for postfix (only postfix.cf), nginx, dovecot, rspamd
- Creating a CalDAV calendar and CardDAV entry using davx5

I have not (yet) tested:
- certdumper
- databases other than sqlite

Todo:
- [x] Get rid of podop at `git+https://github.com/Nebukadneza/Podop.git@fix_py37` once https://github.com/Mailu/Podop/pull/6 is merged
- [x] Bend Mailustart back to original repository
- [x] Test more (? also help wanted ?)

Co-authored-by: Thomas Sänger <thomas@gecko.space>
Co-authored-by: Dario Ernst <dario@kanojo.de>
Co-authored-by: Reto Glauser <git@blinkeye.ch>
master
bors[bot] 5 years ago
commit 2788909a13

@ -11,7 +11,7 @@ RUN mkdir static \
# Actual application
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip git bash \
@ -41,3 +41,4 @@ ENV FLASK_APP mailu
CMD /start.py
HEALTHCHECK CMD curl -f -L http://localhost/ui/login?next=ui.index || exit 1

@ -1,14 +1,15 @@
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip git bash \
&& pip3 install --upgrade pip
# Shared layer between rspamd, postfix, dovecot, unbound and nginx
RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart
# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx
RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart
# Shared layer between dovecot and postfix
RUN pip3 install "podop>0.2.5"
# Image specific layers under this line
RUN apk add --no-cache \
dovecot dovecot-pigeonhole-plugin rspamd-client bash \
&& pip3 install podop \
dovecot dovecot-lmtpd dovecot-pop3d dovecot-submissiond dovecot-pigeonhole-plugin rspamd-client \
&& mkdir /var/lib/dovecot
COPY conf /conf

@ -1,10 +1,10 @@
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip git bash \
&& pip3 install --upgrade pip
# Shared layer between rspamd, postfix, dovecot, unbound and nginx
RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart
# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx
RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart
# Image specific layers under this line
RUN apk add --no-cache certbot nginx nginx-mod-mail openssl curl \
&& pip3 install idna requests watchdog

@ -1,5 +1,5 @@
# This is an idle image to dynamically replace any component if disabled.
FROM alpine:3.8
FROM alpine:3.10
CMD sleep 1000000d

@ -1,14 +1,15 @@
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip git bash \
&& pip3 install --upgrade pip
# Shared layer between rspamd, postfix, dovecot, unbound and nginx
RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart
# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx
RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart
# Shared layer between dovecot and postfix
RUN pip3 install "podop>0.2.5"
# Image specific layers under this line
RUN apk add --no-cache postfix postfix-pcre rsyslog \
&& pip3 install podop
RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-plain
COPY conf /conf
COPY start.py /start.py

@ -2,6 +2,9 @@
# General
###############
# Logging configuration
maillog_file = /dev/stdout
# Main domain and hostname
mydomain = {{ DOMAIN }}
myhostname = {{ HOSTNAMES.split(",")[0] }}

@ -33,3 +33,5 @@ discard unix - - n - - discard
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
postlog unix-dgram n - n - 1 postlogd

@ -1,4 +0,0 @@
$ModLoad imuxsock
$template noTimestampFormat,"%syslogtag%%msg%\n"
$ActionFileDefaultTemplate noTimestampFormat
*.*;auth,authpriv.none /dev/stdout

@ -53,12 +53,7 @@ if "RELAYUSER" in os.environ:
convert("/conf/sasl_passwd", path)
os.system("postmap {}".format(path))
convert("/conf/rsyslog.conf", "/etc/rsyslog.conf")
# Run Podop and Postfix
multiprocessing.Process(target=start_podop).start()
if os.path.exists("/var/run/rsyslogd.pid"):
os.remove("/var/run/rsyslogd.pid")
os.system("/usr/lib/postfix/post-install meta_directory=/etc/postfix create-missing")
os.system("/usr/lib/postfix/master &")
os.execv("/usr/sbin/rsyslogd", ["rsyslogd", "-n"])
os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing")
os.system("postfix start-fg")

@ -1,4 +1,4 @@
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip bash \

@ -1,9 +1,9 @@
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip bash \
&& pip3 install --upgrade pip
# Shared layer between rspamd, postfix, dovecot, unbound and nginx
# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx
RUN pip3 install jinja2
# Image specific layers under this line
RUN apk add --no-cache \

@ -1,7 +1,7 @@
FROM alpine:edge
FROM alpine:3.10
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --no-cache radicale@testing py-dulwich@testing curl bash
&& apk add --no-cache radicale@testing curl bash
COPY radicale.conf /radicale.conf

@ -1,15 +1,16 @@
# First stage: Build
FROM alpine:3.8 as builder
FROM alpine:3.10 as builder
# build dependencies
RUN apk add --no-cache curl tar xz autoconf git gettext build-base openssl openssl-dev
RUN curl -L 'https://sourceforge.net/projects/fetchmail/files/branch_7-alpha/fetchmail-7.0.0-alpha6.tar.xz/download' | tar xJ
RUN cd fetchmail-7.0.0-alpha6 && \
sed -i -e 's/SSLv3_client_method/SSLv23_client_method/' socket.c && \
./configure --with-ssl --prefix /usr/local --disable-nls && \
make
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images

@ -1,10 +1,10 @@
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip git bash \
&& pip3 install --upgrade pip
# Shared layer between rspamd, postfix, dovecot, unbound and nginx
RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart
# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx
RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart
# Image specific layers under this line
RUN apk add --no-cache rspamd rspamd-controller rspamd-proxy rspamd-fuzzy ca-certificates curl

@ -1,10 +1,10 @@
FROM alpine:3.8
FROM alpine:3.10
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip git bash \
&& pip3 install --upgrade pip
# Shared layer between rspamd, postfix, dovecot, unbound and nginx
RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart
# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx
RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart
# Image specific layers under this line
RUN apk add --no-cache unbound curl bind-tools \
&& curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache \

@ -0,0 +1 @@
Dont use complicated rsyslogd logging in postfix anymore, instead start the daemon directly configured to log to stdout.

@ -0,0 +1 @@
Update alpine to 3.10 and clean up the ensuing problems.

@ -1,4 +1,4 @@
FROM php:7.2-apache
FROM php:7.3-apache
#Shared layer between rainloop and roundcube
RUN apt-get update && apt-get install -y \
python3 curl python3-pip git \
@ -22,7 +22,8 @@ RUN apt-get update && apt-get install -y \
&& apt-get purge -y unzip \
&& rm -rf /var/lib/apt/lists
RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart
# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx
RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart
COPY include.php /var/www/html/include.php
COPY php.ini /php.ini

@ -1,4 +1,4 @@
FROM php:7.2-apache
FROM php:7.3-apache
#Shared layer between rainloop and roundcube
RUN apt-get update && apt-get install -y \
python3 curl python3-pip git \
@ -8,7 +8,8 @@ RUN apt-get update && apt-get install -y \
ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.3.9/roundcubemail-1.3.9-complete.tar.gz
RUN apt-get update && apt-get install -y \
zlib1g-dev python3-jinja2 \
zlib1g-dev libzip4 libzip-dev \
python3-jinja2 \
&& docker-php-ext-install zip \
&& echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \
&& rm -rf /var/www/html/ \
@ -23,7 +24,8 @@ RUN apt-get update && apt-get install -y \
&& chown -R www-data: logs temp \
&& rm -rf /var/lib/apt/lists
RUN pip3 install git+https://github.com/usrpro/MailuStart.git#egg=mailustart
# Shared layer between rspamd, postfix, dovecot, unbound, rainloop, roundcube and nginx
RUN pip3 install git+https://github.com/Mailu/MailuStart.git#egg=mailustart
COPY php.ini /php.ini
COPY config.inc.php /var/www/html/config/

Loading…
Cancel
Save