Dockerfile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. FROM alpine:3.19
  2. LABEL maintainer "The Infrastructure Company GmbH GmbH <info@servercow.de>"
  3. # renovate: datasource=github-releases depName=tianon/gosu versioning=semver-coerced extractVersion=^(?<version>.*)$
  4. ARG GOSU_VERSION=1.16
  5. ENV LC_ALL C
  6. # Add groups and users before installing Dovecot to not break compatibility
  7. RUN addgroup -g 5000 vmail \
  8. && addgroup -g 401 dovecot \
  9. && addgroup -g 402 dovenull \
  10. && sed -i "s/999/99/" /etc/group \
  11. && addgroup -g 999 sogo \
  12. && addgroup nobody sogo \
  13. && adduser -D -u 5000 -G vmail -h /var/vmail vmail \
  14. && adduser -D -G dovecot -u 401 -h /dev/null -s /sbin/nologin dovecot \
  15. && adduser -D -G dovenull -u 402 -h /dev/null -s /sbin/nologin dovenull \
  16. && apk add --no-cache --update \
  17. bash \
  18. bind-tools \
  19. findutils \
  20. envsubst \
  21. ca-certificates \
  22. curl \
  23. jq \
  24. lua \
  25. lua-cjson \
  26. lua-socket \
  27. lua-sql-mysql \
  28. lua5.3-sql-mysql \
  29. icu-data-full \
  30. mariadb-connector-c \
  31. lua-sec \
  32. mariadb-dev \
  33. glib-dev \
  34. gcompat \
  35. mariadb-client \
  36. perl \
  37. perl-dev \
  38. perl-ntlm \
  39. perl-cgi \
  40. perl-crypt-openssl-rsa \
  41. perl-utils \
  42. perl-crypt-ssleay \
  43. perl-data-uniqid \
  44. perl-dbd-mysql \
  45. perl-dbi \
  46. perl-digest-hmac \
  47. perl-dist-checkconflicts \
  48. perl-encode-imaputf7 \
  49. perl-file-copy-recursive \
  50. perl-file-tail \
  51. perl-io-socket-inet6 \
  52. perl-io-gzip \
  53. perl-io-socket-ssl \
  54. perl-io-tee \
  55. perl-ipc-run \
  56. perl-json-webtoken \
  57. perl-mail-imapclient \
  58. perl-module-implementation \
  59. perl-module-scandeps \
  60. perl-net-ssleay \
  61. perl-package-stash \
  62. perl-package-stash-xs \
  63. perl-par-packer \
  64. perl-parse-recdescent \
  65. perl-lockfile-simple --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community/ \
  66. libproc \
  67. perl-readonly \
  68. perl-regexp-common \
  69. perl-sys-meminfo \
  70. perl-term-readkey \
  71. perl-test-deep \
  72. perl-test-fatal \
  73. perl-test-mockobject \
  74. perl-test-mock-guard \
  75. perl-test-pod \
  76. perl-test-requires \
  77. perl-test-simple \
  78. perl-test-warn \
  79. perl-try-tiny \
  80. perl-unicode-string \
  81. perl-proc-processtable \
  82. perl-app-cpanminus \
  83. procps \
  84. python3 \
  85. py3-mysqlclient \
  86. py3-html2text \
  87. py3-jinja2 \
  88. py3-redis \
  89. redis \
  90. syslog-ng \
  91. syslog-ng-redis \
  92. syslog-ng-json \
  93. supervisor \
  94. tzdata \
  95. wget \
  96. dovecot \
  97. dovecot-dev \
  98. dovecot-lmtpd \
  99. dovecot-lua \
  100. dovecot-ldap \
  101. dovecot-mysql \
  102. dovecot-sql \
  103. dovecot-submissiond \
  104. dovecot-pigeonhole-plugin \
  105. dovecot-pop3d \
  106. dovecot-fts-solr \
  107. && arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
  108. && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$arch" \
  109. && chmod +x /usr/local/bin/gosu \
  110. && gosu nobody true
  111. #RUN cpan LockFile::Simple
  112. COPY trim_logs.sh /usr/local/bin/trim_logs.sh
  113. COPY clean_q_aged.sh /usr/local/bin/clean_q_aged.sh
  114. COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
  115. COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf
  116. COPY imapsync /usr/local/bin/imapsync
  117. COPY imapsync_runner.pl /usr/local/bin/imapsync_runner.pl
  118. COPY report-spam.sieve /usr/lib/dovecot/sieve/report-spam.sieve
  119. COPY report-ham.sieve /usr/lib/dovecot/sieve/report-ham.sieve
  120. COPY rspamd-pipe-ham /usr/lib/dovecot/sieve/rspamd-pipe-ham
  121. COPY rspamd-pipe-spam /usr/lib/dovecot/sieve/rspamd-pipe-spam
  122. COPY sa-rules.sh /usr/local/bin/sa-rules.sh
  123. COPY maildir_gc.sh /usr/local/bin/maildir_gc.sh
  124. COPY docker-entrypoint.sh /
  125. COPY supervisord.conf /etc/supervisor/supervisord.conf
  126. COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
  127. COPY quarantine_notify.py /usr/local/bin/quarantine_notify.py
  128. COPY quota_notify.py /usr/local/bin/quota_notify.py
  129. COPY repl_health.sh /usr/local/bin/repl_health.sh
  130. ENTRYPOINT ["/docker-entrypoint.sh"]
  131. CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf