Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 1 | FROM debian:bullseye-slim |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 2 | LABEL maintainer "Andre Peters <andre.peters@servercow.de>" |
| 3 | |
| 4 | ARG DEBIAN_FRONTEND=noninteractive |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 5 | ARG SOGO_DEBIAN_REPOSITORY=http://packages.sogo.nu/nightly/5/debian/ |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 6 | ENV LC_ALL C |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 7 | ENV GOSU_VERSION 1.14 |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 8 | |
| 9 | # Prerequisites |
| 10 | RUN 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 Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 14 | 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 \ |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 33 | && apt-key adv --keyserver keys.openpgp.org --recv-key 74FFC6D72B925A34B5D356BDF8A27B36A6E2EAE9 \ |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 34 | && echo "deb ${SOGO_DEBIAN_REPOSITORY} bullseye bullseye" > /etc/apt/sources.list.d/sogo.list \ |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 35 | && 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 | |
| 42 | COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh |
| 43 | COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf |
| 44 | COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf |
| 45 | COPY supervisord.conf /etc/supervisor/supervisord.conf |
| 46 | COPY acl.diff /acl.diff |
| 47 | COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh |
| 48 | COPY docker-entrypoint.sh / |
| 49 | |
| 50 | RUN chmod +x /bootstrap-sogo.sh \ |
| 51 | /usr/local/sbin/stop-supervisor.sh |
| 52 | |
| 53 | ENTRYPOINT ["/docker-entrypoint.sh"] |
| 54 | |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 55 | CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf |