Dockerfile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. FROM debian:bookworm-slim
  2. LABEL maintainer "The Infrastructure Company GmbH GmbH <info@servercow.de>"
  3. ARG DEBIAN_FRONTEND=noninteractive
  4. ARG DEBIAN_VERSION=bookworm
  5. ARG SOGO_DEBIAN_REPOSITORY=http://www.axis.cz/linux/debian
  6. # renovate: datasource=github-releases depName=tianon/gosu versioning=semver-coerced extractVersion=^(?<version>.*)$
  7. ARG GOSU_VERSION=1.17
  8. ENV LC_ALL C
  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. 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-traditional \
  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 keys.openpgp.org --recv-key 74FFC6D72B925A34B5D356BDF8A27B36A6E2EAE9 \
  34. && echo "deb [trusted=yes] ${SOGO_DEBIAN_REPOSITORY} ${DEBIAN_VERSION} sogo-v5" > /etc/apt/sources.list.d/sogo.list \
  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. COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh
  42. COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
  43. COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf
  44. COPY supervisord.conf /etc/supervisor/supervisord.conf
  45. COPY acl.diff /acl.diff
  46. COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
  47. COPY docker-entrypoint.sh /
  48. RUN chmod +x /bootstrap-sogo.sh \
  49. /usr/local/sbin/stop-supervisor.sh
  50. ENTRYPOINT ["/docker-entrypoint.sh"]
  51. CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf