blob: 1e499651726971bca22a072661924550ea682793 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001FROM debian:buster-slim
2LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
3
4ARG DEBIAN_FRONTEND=noninteractive
5ARG SOGO_DEBIAN_REPOSITORY=http://packages.inverse.ca/SOGo/nightly/5/debian/
6ENV LC_ALL C
7ENV GOSU_VERSION 1.11
8
9# Prerequisites
10RUN echo "Building from repository $SOGO_DEBIAN_REPOSITORY" \
11 && apt-get update && apt-get install -y --no-install-recommends \
12 apt-transport-https \
13 ca-certificates \
14 cron \
15 gettext \
16 gnupg \
17 mariadb-client \
18 rsync \
19 supervisor \
20 syslog-ng \
21 syslog-ng-core \
22 syslog-ng-mod-redis \
23 dirmngr \
24 netcat \
25 psmisc \
26 wget \
27 patch \
28 && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
29 && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
30 && chmod +x /usr/local/bin/gosu \
31 && gosu nobody true \
32 && mkdir /usr/share/doc/sogo \
33 && touch /usr/share/doc/sogo/empty.sh \
34 && apt-key adv --keyserver keyserver.ubuntu.com --recv-key 0x810273C4 \
35 && echo "deb ${SOGO_DEBIAN_REPOSITORY} buster buster" > /etc/apt/sources.list.d/sogo.list \
36 && apt-get update && apt-get install -y --no-install-recommends \
37 sogo \
38 sogo-activesync \
39 && apt-get autoclean \
40 && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/sogo.list \
41 && touch /etc/default/locale
42
43COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh
44COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
45COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf
46COPY supervisord.conf /etc/supervisor/supervisord.conf
47COPY acl.diff /acl.diff
48COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
49COPY docker-entrypoint.sh /
50
51RUN chmod +x /bootstrap-sogo.sh \
52 /usr/local/sbin/stop-supervisor.sh
53
54ENTRYPOINT ["/docker-entrypoint.sh"]
55
56CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf