Merge pull request 'Fix Date' (#13) from Update-Pipeline into main
Reviewed-on: #13
This commit is contained in:
@ -35,8 +35,8 @@ jobs:
|
|||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./StableV2
|
context: ./Stable
|
||||||
file: StableV2/Dockerfile
|
file: Stable/Dockerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
pull: false
|
pull: false
|
||||||
push: true
|
push: true
|
||||||
|
@ -3,7 +3,7 @@ LABEL maintainer="gnilebein - <patrick@niebel.ing>"
|
|||||||
|
|
||||||
# Setup Labels
|
# Setup Labels
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ARG IMAGE_CREATEDATE
|
ARG IMAGE_CREATED
|
||||||
|
|
||||||
# Set apt non-interactive
|
# Set apt non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -34,4 +34,4 @@ This allows configuration of the _Webinterface_, _DKIM_ and _Redis_. The tool wr
|
|||||||
|
|
||||||
### Support ###
|
### Support ###
|
||||||
This Docker image is for personal use but let me know if there are any improvements available.
|
This Docker image is for personal use but let me know if there are any improvements available.
|
||||||
Please use [Github](https://github.com/gnilebein/Docker-Rspamd) to send me a message
|
Please use [Github](https://gitea.gnilebein.de/gnilebein/Docker-rspamd) to send me a message
|
||||||
|
@ -1,13 +1,38 @@
|
|||||||
FROM debian:stable-slim
|
FROM debian:stable-slim
|
||||||
LABEL maintainer="gnilebein - <docker@gnilebein.nl>"
|
LABEL maintainer="gnilebein - <patrick@niebel.ing>"
|
||||||
|
|
||||||
|
# Setup Labels
|
||||||
|
ARG VERSION
|
||||||
|
ARG IMAGE_CREATED
|
||||||
|
|
||||||
# Set apt non-interactive
|
# Set apt non-interactive
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
LABEL org.label-schema.name="Rspamd" \
|
||||||
|
org.label-schema.description="Rspamd Spam Filter - STABLE" \
|
||||||
|
org.label-schema.usage="https://gitea.gnilebein.de/gnilebein/-/packages/container/docker-rspamd/latest" \
|
||||||
|
org.label-schema.url="https://rspamd.com" \
|
||||||
|
org.label-schema.vendor="gnilebein" \
|
||||||
|
org.label-schema.schema-version="1.0" \
|
||||||
|
org.label-schema.version=$VERSION \
|
||||||
|
org.label-schema.vcs-url="https://gitea.gnilebein.de/gnilebein/Docker-rspamd" \
|
||||||
|
org.label-schema.build-date=$DATE
|
||||||
|
|
||||||
# Install Rspamd
|
# Install Rspamd
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apt update \
|
&& apt update \
|
||||||
&& apt --no-install-recommends install -y lsb-release wget gnupg openssl ca-certificates \
|
&& apt --no-install-recommends install -y \
|
||||||
|
apt-transport-https \
|
||||||
|
dnsutils \
|
||||||
|
netcat-traditional \
|
||||||
|
lsb-release \
|
||||||
|
wget \
|
||||||
|
gnupg \
|
||||||
|
openssl \
|
||||||
|
ca-certificates \
|
||||||
|
nano \
|
||||||
|
less \
|
||||||
|
ca-certificates \
|
||||||
&& DEBIAN_CODE_NAME=`lsb_release -c -s` \
|
&& DEBIAN_CODE_NAME=`lsb_release -c -s` \
|
||||||
&& wget -O - https://rspamd.com/apt-stable/gpg.key | apt-key add - \
|
&& 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 \
|
&& echo "deb http://rspamd.com/apt-stable/ $DEBIAN_CODE_NAME main" > /etc/apt/sources.list.d/rspamd.list \
|
||||||
@ -16,42 +41,31 @@ RUN set -x \
|
|||||||
&& apt --no-install-recommends install -y rspamd \
|
&& apt --no-install-recommends install -y rspamd \
|
||||||
&& apt autoremove --purge -y \
|
&& apt autoremove --purge -y \
|
||||||
&& apt clean \
|
&& apt clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& echo 'alias ll="ls -la --color"' >> ~/.bashrc
|
||||||
|
|
||||||
# Override default settings
|
# Override default settings
|
||||||
COPY rspamd.conf.local.override /etc/rspamd/
|
COPY rspamd.conf.local.override /etc/rspamd/
|
||||||
COPY worker-controller.inc /etc/rspamd/override.d/
|
COPY worker-controller.inc /etc/rspamd/override.d/
|
||||||
COPY worker-proxy.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
|
# # Keep database and configuration persistent
|
||||||
VOLUME /etc/rspamd/local.d
|
VOLUME /etc/rspamd/local.d
|
||||||
|
VOLUME /etc/rspamd/override.d
|
||||||
|
VOLUME /etc/rspamd/custom
|
||||||
VOLUME /var/lib/rspamd
|
VOLUME /var/lib/rspamd
|
||||||
|
|
||||||
# Port 11334 is for web frontend
|
EXPOSE 11332 11333 11334
|
||||||
# Port 11332 is for milter
|
|
||||||
# Port 11333 is for worker
|
|
||||||
EXPOSE 11332 11334
|
|
||||||
|
|
||||||
# Healtcheck if Rspamd is returning stats
|
# Healtcheck if Rspamd is returning stats
|
||||||
HEALTHCHECK --interval=1m --timeout=5s --start-period=10s \
|
HEALTHCHECK --interval=1m --timeout=5s --start-period=10s \
|
||||||
CMD /usr/bin/rspamadm control stat || exit 1
|
CMD /usr/bin/rspamadm control stat || exit 1
|
||||||
|
|
||||||
# Run Rspamd
|
# Run Rspamd
|
||||||
ENTRYPOINT ["/usr/bin/rspamd","-f","-u","_rspamd","-g","_rspamd"]
|
ENTRYPOINT ["bash", "/docker-entrypoint.sh"]
|
||||||
|
|
||||||
# Setup Labels
|
STOPSIGNAL SIGTERM
|
||||||
ARG VERSION
|
|
||||||
ARG COMMIT
|
|
||||||
ARG BRANCH
|
|
||||||
ARG DATE
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="Rspamd" \
|
CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]
|
||||||
org.label-schema.description="Rspamd Spam Filter - STABLE" \
|
|
||||||
org.label-schema.usage="https://hub.docker.com/r/gnilebein/rspamd/" \
|
|
||||||
org.label-schema.url="https://rspamd.com" \
|
|
||||||
org.label-schema.vendor="gnilebein" \
|
|
||||||
org.label-schema.schema-version="1.0" \
|
|
||||||
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 \
|
|
@ -9,9 +9,8 @@ VERSION=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^
|
|||||||
|
|
||||||
IMAGE_NAME=docker-rspamd
|
IMAGE_NAME=docker-rspamd
|
||||||
|
|
||||||
zip -r config
|
|
||||||
|
|
||||||
docker build \
|
docker build \
|
||||||
|
--no-cache \
|
||||||
--build-arg VERSION=${VERSION} \
|
--build-arg VERSION=${VERSION} \
|
||||||
--build-arg COMMIT=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^\([[:xdigit:]]\{40\}\)[[:blank:]]refs\/tags\/${VERSION}^{}$/\1/p" | xargs git rev-parse --short) \
|
--build-arg COMMIT=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^\([[:xdigit:]]\{40\}\)[[:blank:]]refs\/tags\/${VERSION}^{}$/\1/p" | xargs git rev-parse --short) \
|
||||||
--build-arg BRANCH=$(git rev-parse --abbrev-ref HEAD) \
|
--build-arg BRANCH=$(git rev-parse --abbrev-ref HEAD) \
|
||||||
|
@ -1,72 +0,0 @@
|
|||||||
FROM debian:stable-slim
|
|
||||||
LABEL maintainer="gnilebein - <patrick@niebel.ing>"
|
|
||||||
|
|
||||||
# Setup Labels
|
|
||||||
ARG VERSION
|
|
||||||
ARG IMAGE_CREATED
|
|
||||||
|
|
||||||
# Set apt non-interactive
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
LABEL org.label-schema.name="Rspamd" \
|
|
||||||
org.label-schema.description="Rspamd Spam Filter - STABLE" \
|
|
||||||
org.label-schema.usage="https://gitea.gnilebein.de/gnilebein/-/packages/container/docker-rspamd/latest" \
|
|
||||||
org.label-schema.url="https://rspamd.com" \
|
|
||||||
org.label-schema.vendor="gnilebein" \
|
|
||||||
org.label-schema.schema-version="1.0" \
|
|
||||||
org.label-schema.version=$VERSION \
|
|
||||||
org.label-schema.vcs-url="https://gitea.gnilebein.de/gnilebein/Docker-rspamd" \
|
|
||||||
org.label-schema.vcs-ref=$COMMIT \
|
|
||||||
org.label-schema.build-date=$DATE
|
|
||||||
|
|
||||||
# Install Rspamd
|
|
||||||
RUN set -x \
|
|
||||||
&& apt update \
|
|
||||||
&& apt --no-install-recommends install -y \
|
|
||||||
apt-transport-https \
|
|
||||||
dnsutils \
|
|
||||||
netcat-traditional \
|
|
||||||
lsb-release \
|
|
||||||
wget \
|
|
||||||
gnupg \
|
|
||||||
openssl \
|
|
||||||
ca-certificates \
|
|
||||||
nano \
|
|
||||||
less \
|
|
||||||
ca-certificates \
|
|
||||||
&& 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 \
|
|
||||||
&& apt purge -y lsb-release wget gnupg \
|
|
||||||
&& apt update \
|
|
||||||
&& apt --no-install-recommends install -y rspamd \
|
|
||||||
&& apt autoremove --purge -y \
|
|
||||||
&& apt clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& echo 'alias ll="ls -la --color"' >> ~/.bashrc
|
|
||||||
|
|
||||||
# Override default settings
|
|
||||||
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 /etc/rspamd/local.d
|
|
||||||
VOLUME /etc/rspamd/override.d
|
|
||||||
VOLUME /etc/rspamd/custom
|
|
||||||
VOLUME /var/lib/rspamd
|
|
||||||
|
|
||||||
EXPOSE 11332 11333 11334
|
|
||||||
|
|
||||||
# Healtcheck if Rspamd is returning stats
|
|
||||||
HEALTHCHECK --interval=1m --timeout=5s --start-period=10s \
|
|
||||||
CMD /usr/bin/rspamadm control stat || exit 1
|
|
||||||
|
|
||||||
# Run Rspamd
|
|
||||||
ENTRYPOINT ["bash", "/docker-entrypoint.sh"]
|
|
||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
|
||||||
|
|
||||||
CMD ["/usr/bin/rspamd", "-f", "-u", "_rspamd", "-g", "_rspamd"]
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# hooks/build
|
|
||||||
# https://docs.docker.com/docker-cloud/builds/advanced/
|
|
||||||
|
|
||||||
# $IMAGE_NAME var is injected into the build so the tag is correct.
|
|
||||||
echo "[***] Build hook running"
|
|
||||||
|
|
||||||
VERSION=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^[[:xdigit:]]\{40\}[[:blank:]]refs\/tags\/\([0-9]\{1\}\.[0-9]\{1,2\}\($\|\.[0-9]\{1,2\}$\)\)/\1/p" | sort --version-sort | tail -1)
|
|
||||||
|
|
||||||
IMAGE_NAME=docker-rspamd
|
|
||||||
|
|
||||||
docker build \
|
|
||||||
--no-cache \
|
|
||||||
--build-arg VERSION=${VERSION} \
|
|
||||||
--build-arg COMMIT=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^\([[:xdigit:]]\{40\}\)[[:blank:]]refs\/tags\/${VERSION}^{}$/\1/p" | xargs git rev-parse --short) \
|
|
||||||
--build-arg BRANCH=$(git rev-parse --abbrev-ref HEAD) \
|
|
||||||
--build-arg DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
|
||||||
-t ${IMAGE_NAME} .
|
|
@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
VERSION=$(git ls-remote --tags -q https://github.com/rspamd/rspamd | sed -n "s/^[[:xdigit:]]\{40\}[[:blank:]]refs\/tags\/\([0-9]\{1\}\.[0-9]\{1,2\}\($\|\.[0-9]\{1,2\}$\)\)/\1/p" | sort --version-sort | tail -1)
|
|
||||||
|
|
||||||
docker tag \
|
|
||||||
"${IMAGE_NAME}" \
|
|
||||||
"${DOCKER_REPO}:stable-${VERSION}"
|
|
||||||
docker push \
|
|
||||||
"${DOCKER_REPO}:stable-${VERSION}"
|
|
@ -1,13 +0,0 @@
|
|||||||
options {
|
|
||||||
pidfile = false;
|
|
||||||
.include "$CONFDIR/options.inc"
|
|
||||||
.include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/options.inc"
|
|
||||||
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/options.inc"
|
|
||||||
}
|
|
||||||
|
|
||||||
logging {
|
|
||||||
type = "console";
|
|
||||||
.include "$CONFDIR/logging.inc"
|
|
||||||
.include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/logging.inc"
|
|
||||||
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc"
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
bind_socket = "*:11334";
|
|
@ -1 +0,0 @@
|
|||||||
bind_socket = *:11332;
|
|
Reference in New Issue
Block a user