Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 1 | FROM debian:bullseye-slim |
Matthias Andreas Benkard | d1f5b68 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 2 | LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>" |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 3 | |
| 4 | ARG DEBIAN_FRONTEND=noninteractive |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 5 | ARG CODENAME=bullseye |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 6 | ENV LC_ALL C |
| 7 | |
| 8 | RUN 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 Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 18 | && apt-get --no-install-recommends -y install rspamd redis-tools procps nano \ |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 19 | && rm -rf /var/lib/apt/lists/* \ |
| 20 | && apt-get autoremove --purge \ |
| 21 | && apt-get clean \ |
| 22 | && mkdir -p /run/rspamd \ |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 23 | && chown _rspamd:_rspamd /run/rspamd \ |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 24 | && echo 'alias ll="ls -la --color"' >> ~/.bashrc \ |
| 25 | && sed -i 's/#analysis_keyword_table > 0/analysis_cat_table.macro_exist == "M"/g' /usr/share/rspamd/lualib/lua_scanners/oletools.lua |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 26 | |
| 27 | COPY settings.conf /etc/rspamd/settings.conf |
| 28 | COPY metadata_exporter.lua /usr/share/rspamd/plugins/metadata_exporter.lua |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 29 | COPY set_worker_password.sh /set_worker_password.sh |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 30 | COPY docker-entrypoint.sh /docker-entrypoint.sh |
| 31 | |
| 32 | ENTRYPOINT ["/docker-entrypoint.sh"] |
| 33 | |
| 34 | STOPSIGNAL SIGTERM |
| 35 | |
| 36 | CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"] |