2017-07-05 10:22:43 +02:00
|
|
|
FROM debian:stretch-slim
|
2017-05-13 15:33:32 +02:00
|
|
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
2017-03-02 12:23:23 +02:00
|
|
|
|
2017-05-13 16:29:18 +02:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2017-03-02 12:23:23 +02:00
|
|
|
ENV LC_ALL C
|
|
|
|
ENV GOSU_VERSION 1.9
|
2018-12-19 10:33:59 +02:00
|
|
|
ENV SOGO_VERSION 4.0.4
|
2017-03-02 12:23:23 +02:00
|
|
|
|
2017-06-12 10:42:33 +02:00
|
|
|
# Prerequisites
|
2017-05-13 15:52:16 +02:00
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
2018-11-26 10:10:39 +02:00
|
|
|
apt-transport-https \
|
|
|
|
ca-certificates \
|
|
|
|
cron \
|
|
|
|
gettext \
|
|
|
|
mysql-client \
|
|
|
|
supervisor \
|
|
|
|
syslog-ng \
|
|
|
|
syslog-ng-core \
|
|
|
|
syslog-ng-mod-redis \
|
|
|
|
dirmngr \
|
|
|
|
netcat \
|
|
|
|
psmisc \
|
|
|
|
wget \
|
|
|
|
patch \
|
2018-12-19 10:33:59 +02:00
|
|
|
git \
|
|
|
|
devscripts \
|
|
|
|
debhelper \
|
|
|
|
build-essential \
|
|
|
|
gnustep-make \
|
|
|
|
gnustep-base-runtime \
|
|
|
|
libgnustep-base-dev \
|
|
|
|
libgnustep-base1.24 \
|
|
|
|
gobjc \
|
|
|
|
libxml2-dev \
|
|
|
|
libldap2-dev \
|
|
|
|
libssl-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libpq-dev \
|
|
|
|
default-libmysqlclient-dev \
|
|
|
|
liblasso3-dev \
|
|
|
|
libmemcached-dev \
|
|
|
|
mysql-client \
|
|
|
|
libcurl4-openssl-dev \
|
2018-11-26 10:10:39 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
|
|
|
|
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
|
|
|
|
&& chmod +x /usr/local/bin/gosu \
|
2018-12-19 10:33:59 +02:00
|
|
|
&& gosu nobody true \
|
|
|
|
&& mkdir /tmp/sogo_build \
|
|
|
|
&& cd /tmp/sogo_build \
|
|
|
|
&& git clone -b SOPE-${SOGO_VERSION} https://github.com/inverse-inc/sope.git \
|
|
|
|
&& cd sope \
|
|
|
|
&& ./configure --enable-xml --enable-mysql --enable-openldap --with-gnustep \
|
|
|
|
&& make -j4 \
|
|
|
|
&& make install \
|
|
|
|
&& cd /tmp/sogo_build \
|
|
|
|
&& git clone -b SOGo-${SOGO_VERSION} https://github.com/inverse-inc/sogo.git \
|
|
|
|
&& cd sogo \
|
|
|
|
&& ./configure --enable-saml2 \
|
|
|
|
&& make -j4 \
|
|
|
|
&& make install \
|
|
|
|
&& groupadd -g 6000 sogo \
|
|
|
|
&& useradd -g sogo -u 6000 sogo -d /var/lib/sogo \
|
|
|
|
&& mkdir -p /usr/local/share/doc/sogo \
|
|
|
|
&& touch /usr/local/share/doc/sogo/empty.sh \
|
2018-11-26 10:10:39 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2018-12-19 10:33:59 +02:00
|
|
|
&& echo '* * * * * sogo /usr/local/sbin/sogo-ealarms-notify 2>/dev/null' > /etc/cron.d/sogo \
|
|
|
|
&& echo '* * * * * sogo /usr/local/sbin/sogo-tool expire-sessions 60' >> /etc/cron.d/sogo \
|
|
|
|
&& echo '0 0 * * * sogo /usr/local/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds' >> /etc/cron.d/sogo \
|
|
|
|
&& touch /etc/default/locale \
|
|
|
|
&& echo '/usr/local/lib/sogo' > /etc/ld.so.conf.d/sogo.conf \
|
|
|
|
&& ldconfig \
|
|
|
|
&& mkdir -p /var/run/sogo /var/spool/sogo \
|
|
|
|
&& chown sogo:sogo /var/run/sogo /var/spool/sogo \
|
|
|
|
&& rm -rf /tmp/* /var/tmp/* /usr/bin/mysql_embedded /usr/bin/mariabackup /tmp/sogo_build \
|
|
|
|
&& apt-get purge -y libxml2-dev \
|
|
|
|
libldap2-dev \
|
|
|
|
libssl-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libpq-dev \
|
|
|
|
default-libmysqlclient-dev \
|
|
|
|
liblasso3-dev \
|
|
|
|
libmemcached-dev \
|
|
|
|
libgnustep-base-dev \
|
|
|
|
libcurl4-openssl-dev \
|
|
|
|
devscripts \
|
|
|
|
debhelper \
|
|
|
|
build-essential \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
autopoint \
|
|
|
|
autotools-dev \
|
|
|
|
binutils \
|
|
|
|
cpp \
|
|
|
|
cpp-6 \
|
|
|
|
dh-python \
|
|
|
|
dpkg-dev \
|
|
|
|
g++-6 \
|
|
|
|
gcc-6 \
|
|
|
|
gobjc-6 \
|
|
|
|
groff-base \
|
|
|
|
icu-devtools \
|
|
|
|
libc-dev-bin \
|
|
|
|
libc6-dev \
|
|
|
|
libgcc-6-dev \
|
|
|
|
libgcrypt20-dev \
|
|
|
|
libgmp-dev \
|
|
|
|
libgpg-error-dev \
|
|
|
|
libhashkit-dev \
|
|
|
|
libicu-dev \
|
|
|
|
libidn11-dev \
|
|
|
|
libnspr4-dev \
|
|
|
|
libnss3-dev \
|
|
|
|
libobjc-6-dev \
|
|
|
|
libp11-kit-dev \
|
|
|
|
libpcre3-dev \
|
|
|
|
libsasl2-dev \
|
|
|
|
libtasn1-6-dev \
|
|
|
|
linux-libc-dev \
|
|
|
|
nettle-dev
|
2017-05-13 22:58:10 +02:00
|
|
|
|
2018-10-25 22:35:07 +02:00
|
|
|
COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh
|
2017-05-13 22:58:10 +02:00
|
|
|
COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
|
2017-03-02 12:23:23 +02:00
|
|
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
2018-08-17 21:42:31 +02:00
|
|
|
COPY acl.diff /acl.diff
|
2018-10-25 22:35:07 +02:00
|
|
|
COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
|
|
|
|
|
|
|
|
RUN chmod +x /bootstrap-sogo.sh \
|
|
|
|
/usr/local/sbin/stop-supervisor.sh
|
|
|
|
|
2017-03-02 12:23:23 +02:00
|
|
|
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
|
|
|
|
2018-12-19 10:33:59 +02:00
|
|
|
VOLUME /usr/local/lib/GNUstep/SOGo/
|