blob: 35e0721ecc8bdbde622980a7c48f86bb7036afd9 [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001FROM debian:bullseye-slim
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +01002LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>"
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01003
4ARG DEBIAN_FRONTEND=noninteractive
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +01005ARG SOGO_DEBIAN_REPOSITORY=http://packages.sogo.nu/nightly/5/debian/
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +01006# renovate: datasource=github-releases depName=tianon/gosu versioning=semver-coerced extractVersion=^v(?<version>.*)$
7ARG GOSU_VERSION=1.16
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01008ENV LC_ALL C
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01009
10# Prerequisites
11RUN echo "Building from repository $SOGO_DEBIAN_REPOSITORY" \
12 && apt-get update && apt-get install -y --no-install-recommends \
13 apt-transport-https \
14 ca-certificates \
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010015 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 \
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010034 && apt-key adv --keyserver keys.openpgp.org --recv-key 74FFC6D72B925A34B5D356BDF8A27B36A6E2EAE9 \
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010035 && echo "deb ${SOGO_DEBIAN_REPOSITORY} bullseye bullseye" > /etc/apt/sources.list.d/sogo.list \
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010036 && 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
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010056CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf