forked from tozd/docker-sympa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlatest.dockerfile
More file actions
51 lines (45 loc) · 3.03 KB
/
Copy pathlatest.dockerfile
File metadata and controls
51 lines (45 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM registry.gitlab.com/tozd/docker/nginx:ubuntu-focal
ENV FCGI_HOST 127.0.0.1
ENV FCGI_PORT 9000
ENV ADMINADDR admin@example.com
ENV REMOTES mail.example.com
VOLUME /var/log/sympa
VOLUME /etc/sympa/includes
VOLUME /etc/sympa/shared
VOLUME /var/spool/sympa
VOLUME /var/lib/sympa
VOLUME /var/spool/nullmailer
# We install recommended Sympa packages manually otherwise Sympa installation fails.
RUN apt-get update -q -q && \
apt-get --yes --force-yes --no-install-recommends install nullmailer rsyslog && \
apt-get --yes --force-yes install openssh-server
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql-pgdg.list > /dev/null && \
apt-get update && \
apt-get --yes --force-yes --no-install-recommends install postgresql-client-10
RUN apt-get --yes --force-yes --no-install-recommends install build-essential
RUN groupadd sympa && \
useradd -g sympa -c 'Sympa user' -s /usr/sbin/nologin sympa && \
wget --quiet -O sympa-6.2.24.tar.gz https://github.com/sympa-community/sympa/releases/download/6.2.24/sympa-6.2.24.tar.gz && \
tar xzf sympa-6.2.24.tar.gz
RUN cd sympa-6.2.24 && \
./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-fhs --sysconfdir=/etc/sympa --sbindir=/usr/lib/sympa/bin --libexecdir=/usr/lib/sympa/bin --with-cgidir=/usr/lib/cgi-bin/sympa --datadir=/usr/share --localedir=/usr/lib/sympa/locale --mandir=/usr/share/man --with-initdir=/etc/init.d --docdir=/usr/share/doc/sympa --with-piddir=/run/sympa --with-perl=/usr/bin/perl --with-user=sympa --with-group=sympa --with-aliases_file=/etc/mail/sympa/aliases --disable-smtpc && \
make && make install
RUN apt-get --yes --force-yes install libglib2.0-data shared-mime-info libio-socket-ip-perl \
libio-socket-inet6-perl krb5-locales libmime-types-perl libsasl2-modules libhtml-form-perl \
libhttp-daemon-perl libxml-sax-expat-perl xml-core libfile-nfslock-perl libsoap-lite-perl \
libcrypt-ciphersaber-perl libmail-dkim-perl && \
mkdir -p /var/run/sympa && \
chown sympa:sympa /var/run/sympa && \
chsh --shell /bin/sh sympa && \
sed -i 's/sympa\.log/sympa\/sympa.log/' /etc/rsyslog.conf && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
COPY ./patches /patches
RUN apt-get update -q -q && \
apt-get --yes --force-yes install patch && \
for patch in /patches/*; do patch --directory=/ --prefix=/patches/ -p0 --force "--input=/$patch" || exit 1; done && \
rm -rf /patches && \
apt-get --yes --force-yes --autoremove purge patch && \
rm -rf /usr/lib/sympa/locale/en_US /usr/lib/sympa/locale/en && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache ~/.npm
COPY ./etc /etc