blob: ee08f8d200855102691bad46cba502034229ebb3 [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001FROM debian:bullseye-slim
2LABEL maintainer "Andre Peters <andre.peters@tinc.gmbh>"
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01003
4ARG DEBIAN_FRONTEND=noninteractive
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01005ARG CODENAME=bullseye
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01006ENV 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 \
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010018 && apt-get --no-install-recommends -y install rspamd redis-tools procps nano \
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010019 && rm -rf /var/lib/apt/lists/* \
20 && apt-get autoremove --purge \
21 && apt-get clean \
22 && mkdir -p /run/rspamd \
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010023 && chown _rspamd:_rspamd /run/rspamd \
24 && echo 'alias ll="ls -la --color"' >> ~/.bashrc
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010025
26COPY settings.conf /etc/rspamd/settings.conf
27COPY metadata_exporter.lua /usr/share/rspamd/plugins/metadata_exporter.lua
28COPY docker-entrypoint.sh /docker-entrypoint.sh
29
30ENTRYPOINT ["/docker-entrypoint.sh"]
31
32STOPSIGNAL SIGTERM
33
34CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]