Dockerfile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. FROM debian:bullseye-slim
  2. LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>"
  3. ARG DEBIAN_FRONTEND=noninteractive
  4. ARG SOGO_DEBIAN_REPOSITORY=http://packages.sogo.nu/nightly/5/debian/
  5. # renovate: datasource=github-releases depName=tianon/gosu versioning=semver-coerced extractVersion=^(?<version>.*)$
  6. ARG GOSU_VERSION=1.16
  7. ENV LC_ALL C
  8. # Prerequisites
  9. RUN echo "Building from repository $SOGO_DEBIAN_REPOSITORY" \
  10. && apt-get update && apt-get install -y --no-install-recommends \
  11. apt-transport-https \
  12. ca-certificates \
  13. gettext \
  14. gnupg \
  15. mariadb-client \
  16. rsync \
  17. supervisor \
  18. syslog-ng \
  19. syslog-ng-core \
  20. syslog-ng-mod-redis \
  21. dirmngr \
  22. netcat \
  23. psmisc \
  24. wget \
  25. patch \
  26. && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
  27. && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
  28. && chmod +x /usr/local/bin/gosu \
  29. && gosu nobody true \
  30. && mkdir /usr/share/doc/sogo \
  31. && touch /usr/share/doc/sogo/empty.sh \
  32. && apt-key adv --keyserver keys.openpgp.org --recv-key 74FFC6D72B925A34B5D356BDF8A27B36A6E2EAE9 \
  33. && echo "deb ${SOGO_DEBIAN_REPOSITORY} bullseye bullseye" > /etc/apt/sources.list.d/sogo.list \
  34. && apt-get update && apt-get install -y --no-install-recommends \
  35. sogo \
  36. sogo-activesync \
  37. && apt-get autoclean \
  38. && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/sogo.list \
  39. && touch /etc/default/locale
  40. COPY ./bootstrap-sogo.sh /bootstrap-sogo.sh
  41. COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
  42. COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf
  43. COPY supervisord.conf /etc/supervisor/supervisord.conf
  44. COPY acl.diff /acl.diff
  45. COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
  46. COPY docker-entrypoint.sh /
  47. RUN chmod +x /bootstrap-sogo.sh \
  48. /usr/local/sbin/stop-supervisor.sh
  49. ENTRYPOINT ["/docker-entrypoint.sh"]
  50. CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf