Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame^] | 1 | FROM debian:buster-slim |
| 2 | LABEL maintainer "Andre Peters <andre.peters@servercow.de>" |
| 3 | |
| 4 | ARG DEBIAN_FRONTEND=noninteractive |
| 5 | ARG SOGO_DEBIAN_REPOSITORY=http://packages.inverse.ca/SOGo/nightly/5/debian/ |
| 6 | ENV LC_ALL C |
| 7 | ENV GOSU_VERSION 1.11 |
| 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 \ |
| 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 | |
| 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 | |
| 56 | CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf |