1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-18 17:40:38 +02:00
Mailu/core/postfix/Dockerfile
bors[bot] 65d905fe62
Merge #2099
2099: update Dockerfile to alpine 3.14.3 r=mergify[bot] a=willofr

## What type of PR?
Security fix

## What does this PR do?
Updated the Dockerfile to use the latest alpine version 3.14.3 where several CVEs have been fixed: https://alpinelinux.org/posts/Alpine-3.14.3-released.html
New images successfully built on my test env.

### Related issue(s)
None

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [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/workflow.html#changelog) entry file.


Co-authored-by: Will <will@packer-output-c8fcfb40-3d93-4475-8f87-e14a9dd683b6>
Co-authored-by: willofr <willofr@users.noreply.github.com>
2021-12-31 12:06:53 +00:00

38 lines
1.0 KiB
Docker

ARG DISTRO=alpine:3.14.3
FROM $DISTRO
ARG VERSION
ENV TZ Etc/UTC
LABEL version=$VERSION
# python3 shared with most images
RUN apk add --no-cache \
python3 py3-pip git bash py3-multidict py3-yarl tzdata \
&& pip3 install --upgrade pip
# Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube
RUN pip3 install socrate==0.2.0
# Shared layer between dovecot and postfix
RUN pip3 install "podop>0.2.5"
# Image specific layers under this line
# Building pycares from source requires py3-wheel and libffi-dev packages
RUN apk add --no-cache --virtual .build-deps gcc musl-dev python3-dev py3-wheel libffi-dev \
&& pip3 install --no-binary :all: postfix-mta-sts-resolver==1.0.1 \
&& apk del .build-deps
RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-login rsyslog logrotate
COPY conf /conf
COPY start.py /start.py
EXPOSE 25/tcp 10025/tcp
VOLUME ["/queue"]
CMD /start.py
HEALTHCHECK --start-period=350s CMD echo QUIT|nc localhost 25|grep "220 .* ESMTP Postfix"
RUN echo $VERSION >> /version