aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile34
-rw-r--r--docker/rspamd.conf21
-rw-r--r--docker/rspamd.list2
3 files changed, 16 insertions, 41 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 70133a5bc..9ec9aece2 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,25 +1,23 @@
+FROM debian:stretch
-FROM debian:latest
-MAINTAINER Matt Simerson <matt@tnpi.net>
+RUN apt-get update \
+&& apt-get install -y --no-install-recommends gnupg dirmngr curl \
+&& curl -fsSL http://rspamd.com/apt-stable/gpg.key | apt-key add - \
+&& apt-get purge -y --auto-remove curl \
+&& rm -rf /var/lib/apt/lists/*
-# if Debian's ancient 0.6.10 is new enough...
-#RUN apt-get update && apt-get install -y rspamd
+RUN echo "deb http://rspamd.com/apt-stable/ stretch main" > /etc/apt/sources.list.d/rspamd.list
-# Instead, get latest release, from the source
-COPY rspamd.list /etc/apt/sources.list.d/rspamd.list
-RUN apt-get update \
- && apt-get install -y curl \
- && curl -o - http://rspamd.com/apt-stable/gpg.key | apt-key add - \
- && apt-get install -y --force-yes \
- rspamd \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/*
+RUN apt-get update \
+&& apt-get install -y rspamd \
+&& rm -rf /var/lib/apt/lists/*
-# start up rspamd once, as it does some initialization
-RUN update-rc.d rspamd defaults && service rspamd start && sleep 30
+RUN echo 'type = "console";' > /etc/rspamd/override.d/logging.inc \
+&& echo 'bind_socket = "*:11334";' > /etc/rspamd/override.d/worker-controller.inc \
+&& echo 'pidfile = false;' > /etc/rspamd/override.d/options.inc
-# Debian 8's rspamd.conf is for systemd, which is not running in container
-COPY rspamd.conf /etc/rspamd/rspamd.conf
-CMD ["/usr/bin/rspamd","-f", "-u", "_rspamd", "-g", "_rspamd"]
+VOLUME [ "/var/lib/rspamd" ]
+
+CMD [ "/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd" ]
EXPOSE 11333 11334
diff --git a/docker/rspamd.conf b/docker/rspamd.conf
deleted file mode 100644
index 46837de6a..000000000
--- a/docker/rspamd.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-.include "$CONFDIR/common.conf"
-
-options {
- .include "$CONFDIR/options.inc"
-}
-
-logging {
- type = "console";
- systemd = false;
- .include "$CONFDIR/logging.inc"
-}
-
-worker {
- bind_socket = "*:11333";
- .include "$CONFDIR/worker-normal.inc"
-}
-
-worker {
- bind_socket = "localhost:11334";
- .include "$CONFDIR/worker-controller.inc"
-}
diff --git a/docker/rspamd.list b/docker/rspamd.list
deleted file mode 100644
index 6be6b647a..000000000
--- a/docker/rspamd.list
+++ /dev/null
@@ -1,2 +0,0 @@
-deb http://rspamd.com/apt-stable/ jessie main
-deb-src http://rspamd.com/apt-stable/ jessie main