From fbac28974b1232e16b532c59b75f5c3caf837f96 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 14 May 2017 14:25:10 +0200 Subject: [PATCH] Base on Alpine --- data/Dockerfiles/rspamd/Dockerfile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/data/Dockerfiles/rspamd/Dockerfile b/data/Dockerfiles/rspamd/Dockerfile index cb097a66..0eb0b6b6 100644 --- a/data/Dockerfiles/rspamd/Dockerfile +++ b/data/Dockerfiles/rspamd/Dockerfile @@ -1,27 +1,22 @@ -FROM debian:jessie-slim +FROM alpine:edge LABEL maintainer "Andre Peters " -ARG DEBIAN_FRONTEND=noninteractive ENV LC_ALL C -RUN apt-key adv --fetch-keys http://rspamd.com/apt-stable/gpg.key \ - && echo "deb http://rspamd.com/apt-stable/ jessie main" > /etc/apt/sources.list.d/rspamd.list \ - && apt-get update && apt-get install -y \ - ca-certificates \ - python-pip \ - rspamd \ - && rm -rf /var/lib/apt/lists/* +RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \ + && apk add --no-cache rspamd rspamd-controller rsyslog ca-certificates \ + && adduser -S _rspamd RUN echo '.include $LOCAL_CONFDIR/local.d/rspamd.conf.local' > /etc/rspamd/rspamd.conf.local COPY settings.conf /etc/rspamd/modules.d/settings.conf COPY antivirus.conf /etc/rspamd/modules.d/antivirus.conf COPY dkim_signing.lua /usr/share/rspamd/lua/dkim_signing.lua -RUN pip install -U oletools -CMD /usr/bin/rspamd -f -u _rspamd -g _rspamd +CMD /usr/sbin/rspamd -f -u _rspamd -g _rspamd RUN rm -rf /tmp/* /var/tmp/* +RUN mkdir /run/rspamd && chown -R _rspamd: /run/rspamd USER _rspamd