Skip to content

Commit

Permalink
Merge pull request #56 from LaurenceJJones/main
Browse files Browse the repository at this point in the history
fix: revert build_ver arg as currently causing build issues
  • Loading branch information
LaurenceJJones authored Jun 17, 2024
2 parents 499505f + e903bb8 commit 0d740ea
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions crowdsec/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM $BUILD_FROM

ARG BUILD_ARCH
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 \
Expand Down Expand Up @@ -47,21 +46,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=${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
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /staging/etc/crowdsec /etc/crowdsec
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /staging/var/lib/crowdsec /var/lib/crowdsec
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /usr/local/bin/crowdsec /usr/local/bin/crowdsec
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /usr/local/bin/cscli /usr/local/bin/cscli
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /docker_start.sh /docker_start.sh
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /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=${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
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /staging/etc/crowdsec/notifications/email.yaml /etc/crowdsec/notifications/email.yaml
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /staging/etc/crowdsec/notifications/http.yaml /etc/crowdsec/notifications/http.yaml
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /staging/etc/crowdsec/notifications/slack.yaml /etc/crowdsec/notifications/slack.yaml
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /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=${BUILD_VER} /usr/local/lib/crowdsec/plugins /usr/local/lib/crowdsec/plugins
COPY --from=crowdsecurity/crowdsec:v1.6.1-2 /usr/local/lib/crowdsec/plugins /usr/local/lib/crowdsec/plugins

# Copy root filesystem
COPY rootfs /

0 comments on commit 0d740ea

Please sign in to comment.