blob: 72f7d816c0dc631c9767784ddd4f6a45bf20a43a [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001FROM debian:bullseye-slim
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01002LABEL 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
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01007ENV GOSU_VERSION 1.14
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01008
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 \
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010014 gettext \
15 gnupg \
16 mariadb-client \
17 rsync \
18 supervisor \
19 syslog-ng \
20 syslog-ng-core \
21 syslog-ng-mod-redis \
22 dirmngr \
23 netcat \
24 psmisc \
25 wget \
26 patch \
27 && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
28 && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
29 && chmod +x /usr/local/bin/gosu \
30 && gosu nobody true \
31 && mkdir /usr/share/doc/sogo \
32 && touch /usr/share/doc/sogo/empty.sh \
33 && apt-key adv --keyserver keyserver.ubuntu.com --recv-key 0x810273C4 \
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010034 && echo "deb ${SOGO_DEBIAN_REPOSITORY} bullseye bullseye" > /etc/apt/sources.list.d/sogo.list \
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010035 && apt-get update && apt-get install -y --no-install-recommends \
36 sogo \
37 sogo-activesync \
38 && apt-get autoclean \
39 && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/sogo.list \
40 && touch /etc/default/locale
41
42COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh
43COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
44COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf
45COPY supervisord.conf /etc/supervisor/supervisord.conf
46COPY acl.diff /acl.diff
47COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
48COPY docker-entrypoint.sh /
49
50RUN chmod +x /bootstrap-sogo.sh \
51 /usr/local/sbin/stop-supervisor.sh
52
53ENTRYPOINT ["/docker-entrypoint.sh"]
54
55CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf