-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
57 lines (48 loc) · 1.83 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM debian:stable-slim
LABEL maintainer="Rayzilt - <docker@rayzilt.nl>"
# Set apt non-interactive
ENV DEBIAN_FRONTEND noninteractive
# Install Rspamd
RUN set -x \
&& apt update \
&& apt --no-install-recommends install -y lsb-release wget gnupg openssl ca-certificates \
&& DEBIAN_CODE_NAME=`lsb_release -c -s` \
&& wget -O - https://rspamd.com/apt-stable/gpg.key | apt-key add - \
&& echo "deb http://rspamd.com/apt-stable/ $DEBIAN_CODE_NAME main" > /etc/apt/sources.list.d/rspamd.list \
&& apt purge -y lsb-release wget gnupg \
&& apt update \
&& apt --no-install-recommends install -y rspamd \
&& apt autoremove --purge -y \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
# Override default settings
COPY rspamd.conf.local.override /etc/rspamd/
COPY worker-controller.inc /etc/rspamd/override.d/
COPY worker-proxy.inc /etc/rspamd/override.d/
# Keep database and configuration persistent
VOLUME /etc/rspamd/local.d
VOLUME /var/lib/rspamd
# Port 11334 is for web frontend
# Port 11332 is for milter
# Port 11333 is for worker
EXPOSE 11332 11334
# Healtcheck if Rspamd is returning stats
HEALTHCHECK --interval=1m --timeout=5s --start-period=10s \
CMD /usr/bin/rspamadm control stat || exit 1
# Run Rspamd
ENTRYPOINT ["/usr/bin/rspamd","-f","-u","_rspamd","-g","_rspamd"]
# Setup Labels
ARG VERSION
ARG COMMIT
ARG BRANCH
ARG DATE
LABEL org.label-schema.name="Rspamd" \
org.label-schema.description="Rspamd Spam Filter - STABLE" \
org.label-schema.usage="https://hub.docker.com/r/rayzilt/rspamd/" \
org.label-schema.url="https://rspamd.com" \
org.label-schema.vendor="Rayzilt" \
org.label-schema.schema-version="1.0" \
org.label-schema.version=$VERSION \
org.label-schema.vcs-url="https://github.com/rspamd/rspamd/" \
org.label-schema.vcs-ref=$COMMIT \
org.label-schema.build-date=$DATE \