Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 1 | FROM debian:bullseye-slim |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame^] | 2 | LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>" |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 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 | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame^] | 6 | # renovate: datasource=github-releases depName=tianon/gosu versioning=semver-coerced extractVersion=^v(?<version>.*)$ |
| 7 | ARG GOSU_VERSION=1.16 |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 8 | ENV LC_ALL C |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 9 | |
| 10 | # Prerequisites |
| 11 | RUN 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 Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 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 \ |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 34 | && apt-key adv --keyserver keys.openpgp.org --recv-key 74FFC6D72B925A34B5D356BDF8A27B36A6E2EAE9 \ |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 35 | && 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] | 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 | |
| 43 | COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh |
| 44 | COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf |
| 45 | COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf |
| 46 | COPY supervisord.conf /etc/supervisor/supervisord.conf |
| 47 | COPY acl.diff /acl.diff |
| 48 | COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh |
| 49 | COPY docker-entrypoint.sh / |
| 50 | |
| 51 | RUN chmod +x /bootstrap-sogo.sh \ |
| 52 | /usr/local/sbin/stop-supervisor.sh |
| 53 | |
| 54 | ENTRYPOINT ["/docker-entrypoint.sh"] |
| 55 | |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 56 | CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf |