diff --git a/Dockerfile b/Dockerfile index 22cf3fd..6534535 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,15 @@ FROM alpine:3.16 +RUN addgroup -g 2000 rspamd && adduser -u 2000 -G rspamd -h /var/lib/rspamd -D -s /sbin/nologin rspamd + RUN apk add --no-cache rspamd rspamd-controller rspamd-proxy rspamd-fuzzy ca-certificates curl RUN mkdir /run/rspamd +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 + COPY start.sh / EXPOSE 11332/tcp 11334/tcp 11335/tcp diff --git a/start.sh b/start.sh index 9fed1b8..cfad74c 100755 --- a/start.sh +++ b/start.sh @@ -10,6 +10,5 @@ password = "${PASSWORD}"; enable_password = "${PASSWORD}"; EOF - -rspamd -i +rspamd -f -u rspamd -g rspamd ln -sf /proc/1/fd/1 /var/log/rspamd/rspamd.log