From 112a60c11313c829c4fe76d1ebcd062a16537d91 Mon Sep 17 00:00:00 2001 From: modem7 Date: Tue, 30 Apr 2024 18:43:22 +0100 Subject: [PATCH 1/2] bump crowdsec version to 1.6.1-2 --- crowdsec/CHANGELOG.md | 4 ++++ crowdsec/Dockerfile | 24 +++++++++++++----------- crowdsec/config.yaml | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/crowdsec/CHANGELOG.md b/crowdsec/CHANGELOG.md index 011d4b6..ce010f1 100644 --- a/crowdsec/CHANGELOG.md +++ b/crowdsec/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.6.1-2 + +- Bump crowdsec version to 1.6.1-2 + ## 1.6.0-1 - Bump crowdsec version to 1.6.0-1 \ No newline at end of file diff --git a/crowdsec/Dockerfile b/crowdsec/Dockerfile index 5960eb1..73e7ada 100644 --- a/crowdsec/Dockerfile +++ b/crowdsec/Dockerfile @@ -2,6 +2,8 @@ ARG BUILD_FROM FROM $BUILD_FROM ARG BUILD_ARCH +ENV BUILD_IMG=crowdsecurity/crowdsec +ENV BUILD_VER=${BUILD_IMG}:v1.6.1-2 RUN apt-get update RUN apt-get install -y -q --install-recommends --no-install-suggests \ @@ -45,21 +47,21 @@ RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/ #Add alias until env variables will be supported by crowdsec. RUN echo 'alias cscli="cscli -c /config/.storage/crowdsec/config/config.yaml"' > /root/.bashrc -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /staging/etc/crowdsec /etc/crowdsec -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /staging/var/lib/crowdsec /var/lib/crowdsec -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /usr/local/bin/crowdsec /usr/local/bin/crowdsec -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /usr/local/bin/cscli /usr/local/bin/cscli -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /docker_start.sh /docker_start.sh -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /staging/etc/crowdsec/config.yaml /etc/crowdsec/config.yaml +COPY --from=${BUILD_VER} /staging/etc/crowdsec /etc/crowdsec +COPY --from=${BUILD_VER} /staging/var/lib/crowdsec /var/lib/crowdsec +COPY --from=${BUILD_VER} /usr/local/bin/crowdsec /usr/local/bin/crowdsec +COPY --from=${BUILD_VER} /usr/local/bin/cscli /usr/local/bin/cscli +COPY --from=${BUILD_VER} /docker_start.sh /docker_start.sh +COPY --from=${BUILD_VER} /staging/etc/crowdsec/config.yaml /etc/crowdsec/config.yaml #Due to the wizard using cp -n, we have to copy the config files directly from the source as -n does not exist in busybox cp #The files are here for reference, as users will need to mount a new version to be actually able to use notifications -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /staging/etc/crowdsec/notifications/email.yaml /etc/crowdsec/notifications/email.yaml -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /staging/etc/crowdsec/notifications/http.yaml /etc/crowdsec/notifications/http.yaml -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /staging/etc/crowdsec/notifications/slack.yaml /etc/crowdsec/notifications/slack.yaml -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /staging/etc/crowdsec/notifications/splunk.yaml /etc/crowdsec/notifications/splunk.yaml +COPY --from=${BUILD_VER} /staging/etc/crowdsec/notifications/email.yaml /etc/crowdsec/notifications/email.yaml +COPY --from=${BUILD_VER} /staging/etc/crowdsec/notifications/http.yaml /etc/crowdsec/notifications/http.yaml +COPY --from=${BUILD_VER} /staging/etc/crowdsec/notifications/slack.yaml /etc/crowdsec/notifications/slack.yaml +COPY --from=${BUILD_VER} /staging/etc/crowdsec/notifications/splunk.yaml /etc/crowdsec/notifications/splunk.yaml # workaround to avoid having build issue ("failed to create image: failed to get layer") RUN true -COPY --from=crowdsecurity/crowdsec:v1.6.0-1 /usr/local/lib/crowdsec/plugins /usr/local/lib/crowdsec/plugins +COPY --from=${BUILD_VER} /usr/local/lib/crowdsec/plugins /usr/local/lib/crowdsec/plugins # Copy root filesystem COPY rootfs / diff --git a/crowdsec/config.yaml b/crowdsec/config.yaml index a6c8ff3..ee3e496 100644 --- a/crowdsec/config.yaml +++ b/crowdsec/config.yaml @@ -1,7 +1,7 @@ name: "Crowdsec" description: "CrowdSec - the open-source and participative IPS" url: "https://github.com/crowdsecurity/home-assistant-addons/blob/main/crowdsec/DOCS.md" -version: "1.6.0-1" +version: "1.6.1-2" slug: "crowdsec" init: false ingress: true From 0f136c92d33f766e91ace18b1149ab1cfeea006e Mon Sep 17 00:00:00 2001 From: modem7 Date: Tue, 30 Apr 2024 18:58:46 +0100 Subject: [PATCH 2/2] Change ENV to ARG Allows for easier testing --- crowdsec/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crowdsec/Dockerfile b/crowdsec/Dockerfile index 73e7ada..7b12f82 100644 --- a/crowdsec/Dockerfile +++ b/crowdsec/Dockerfile @@ -2,8 +2,8 @@ ARG BUILD_FROM FROM $BUILD_FROM ARG BUILD_ARCH -ENV BUILD_IMG=crowdsecurity/crowdsec -ENV BUILD_VER=${BUILD_IMG}:v1.6.1-2 +ARG BUILD_IMG=crowdsecurity/crowdsec +ARG BUILD_VER=${BUILD_IMG}:v1.6.1-2 RUN apt-get update RUN apt-get install -y -q --install-recommends --no-install-suggests \