Optimize
Signed-off-by: Patrick Niebeling <patrick.niebeling@adacor.com>
This commit is contained in:
@ -2,12 +2,12 @@ FROM debian:stable-slim
|
||||
LABEL maintainer="gnilebein - <docker@gnilebein.nl>"
|
||||
|
||||
# Set apt non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Install Rspamd
|
||||
RUN set -x \
|
||||
&& apt update \
|
||||
&& apt --no-install-recommends install -y lsb-release wget gnupg openssl ca-certificates less nano grep\
|
||||
&& apt --no-install-recommends install -y lsb-release wget gnupg openssl ca-certificates nano less \
|
||||
&& DEBIAN_CODE_NAME=`lsb_release -c -s` \
|
||||
&& wget -O - https://rspamd.com/apt-stable/gpg.key | apt-key add - \
|
||||
&& echo "deb http://rspamd.com/apt-stable/ $DEBIAN_CODE_NAME main" > /etc/apt/sources.list.d/rspamd.list \
|
||||
@ -17,23 +17,19 @@ RUN set -x \
|
||||
&& apt autoremove --purge -y \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& echo 'alias ll="ls -la --color"' >> ~/.bashrc
|
||||
&& echo 'alias ll="ls -la --color"' >> ~/.bashrc
|
||||
|
||||
# Override default settings
|
||||
COPY conf/* /etc/rspamd/
|
||||
COPY rspamd.conf.local.override /etc/rspamd/
|
||||
COPY worker-controller.inc /etc/rspamd/override.d/
|
||||
COPY worker-proxy.inc /etc/rspamd/override.d/
|
||||
COPY set_worker_password.sh /set_worker_password.sh
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
# Keep database and configuration persistent
|
||||
VOLUME /hooks
|
||||
VOLUME /etc/rspamd/custom
|
||||
VOLUME /etc/rspamd/override.d
|
||||
VOLUME /etc/rspamd/local.d
|
||||
VOLUME /etc/rspamd/plugins.d
|
||||
VOLUME /etc/rspamd/lua/
|
||||
VOLUME /etc/rspamd/rspamd.conf.local
|
||||
VOLUME /etc/rspamd/rspamd.conf.override
|
||||
VOLUME /etc/rspamd/override.d
|
||||
VOLUME /etc/rspamd/custom
|
||||
VOLUME /var/lib/rspamd
|
||||
|
||||
# Port 11334 is for web frontend
|
||||
@ -49,8 +45,6 @@ HEALTHCHECK --interval=1m --timeout=5s --start-period=10s \
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
# Setup Labels
|
||||
ARG VERSION
|
||||
ARG COMMIT
|
||||
@ -66,4 +60,4 @@ LABEL org.label-schema.name="Rspamd" \
|
||||
org.label-schema.version=$VERSION \
|
||||
org.label-schema.vcs-url="https://github.com/rspamd/rspamd/" \
|
||||
org.label-schema.vcs-ref=$COMMIT \
|
||||
org.label-schema.build-date=$DATE \
|
||||
org.label-schema.build-date=$DATE \
|
||||
|
Reference in New Issue
Block a user