Browse Source

Dockerfile, for running in Docker container

tags/1.1.0
Matt Simerson 8 years ago
parent
commit
5b00fe5b2d
3 changed files with 48 additions and 0 deletions
  1. 25
    0
      docker/Dockerfile
  2. 21
    0
      docker/rspamd.conf
  3. 2
    0
      docker/rspamd.list

+ 25
- 0
docker/Dockerfile View File

@@ -0,0 +1,25 @@

FROM debian:latest
MAINTAINER Matt Simerson <matt@tnpi.net>

# if Debian's ancient 0.6.10 is new enough...
#RUN apt-get update && apt-get install -y rspamd

# 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/*

# start up rspamd once, as it does some initialization
RUN update-rc.d rspamd defaults && service rspamd start && sleep 30

# 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"]

EXPOSE 11333 11334

+ 21
- 0
docker/rspamd.conf View File

@@ -0,0 +1,21 @@
.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"
}

+ 2
- 0
docker/rspamd.list View File

@@ -0,0 +1,2 @@
deb http://rspamd.com/apt-stable/ jessie main
deb-src http://rspamd.com/apt-stable/ jessie main

Loading…
Cancel
Save