blob: 888bdcb255f008ccc6b4dc6ccf68bcc462182021 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001FROM debian:buster-slim
2LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
3
4ARG DEBIAN_FRONTEND=noninteractive
5ARG CODENAME=buster
6ENV LC_ALL C
7
8RUN apt-get update && apt-get install -y \
9 tzdata \
10 ca-certificates \
11 gnupg2 \
12 apt-transport-https \
13 dnsutils \
14 netcat \
15 && apt-key adv --fetch-keys https://rspamd.com/apt-stable/gpg.key \
16 && echo "deb [arch=amd64] https://rspamd.com/apt-stable/ $CODENAME main" > /etc/apt/sources.list.d/rspamd.list \
17 && apt-get update \
18 && apt-get --no-install-recommends -y install rspamd redis-tools \
19 && rm -rf /var/lib/apt/lists/* \
20 && apt-get autoremove --purge \
21 && apt-get clean \
22 && mkdir -p /run/rspamd \
23 && chown _rspamd:_rspamd /run/rspamd
24
25COPY settings.conf /etc/rspamd/settings.conf
26COPY metadata_exporter.lua /usr/share/rspamd/plugins/metadata_exporter.lua
27COPY docker-entrypoint.sh /docker-entrypoint.sh
28
29ENTRYPOINT ["/docker-entrypoint.sh"]
30
31STOPSIGNAL SIGTERM
32
33CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]