Browse Source

Run as rspamd user and fix startup

master 3.2.0
Fábio Kaiser Rauber 2 years ago
parent
commit
328fe8d03d
  1. 6
      Dockerfile
  2. 3
      start.sh

6
Dockerfile

@ -1,9 +1,15 @@
FROM alpine:3.16 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 apk add --no-cache rspamd rspamd-controller rspamd-proxy rspamd-fuzzy ca-certificates curl
RUN mkdir /run/rspamd 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 / COPY start.sh /
EXPOSE 11332/tcp 11334/tcp 11335/tcp EXPOSE 11332/tcp 11334/tcp 11335/tcp

3
start.sh

@ -10,6 +10,5 @@ password = "${PASSWORD}";
enable_password = "${PASSWORD}"; enable_password = "${PASSWORD}";
EOF EOF
rspamd -f -u rspamd -g rspamd
rspamd -i
ln -sf /proc/1/fd/1 /var/log/rspamd/rspamd.log ln -sf /proc/1/fd/1 /var/log/rspamd/rspamd.log

Loading…
Cancel
Save