You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most (all?) bouncers seem to be available as a Docker image, but not this one. Arguably depending on what the custom script is doing, a custom image will still need to be built (to install dependencies), but having an official image to extend would make the process easier.
In the meantime if anyone having the same issue, here's a sample Dockerfile that works for me (the custom script just needs to be mounted to the bin_path value in the YAML config):
ARG VERSION=v0.0.17-rc6
FROM golang:1.21.4 as build-stage
ARG VERSION
WORKDIR /app
RUN git clone --branch $VERSION --depth 1 https://github.com/crowdsecurity/cs-custom-bouncer.git
WORKDIR /app/cs-custom-bouncer
RUN CGO_ENABLED=0 GOOS=linux make release
FROM ubuntu:22.04
ARG VERSION
WORKDIR /
RUN mkdir -p /etc/crowdsec/bouncers
COPY --from=build-stage /app/cs-custom-bouncer/crowdsec-custom-bouncer-$VERSION/crowdsec-custom-bouncer \
/usr/bin/crowdsec-custom-bouncer
COPY --from=build-stage /app/cs-custom-bouncer/crowdsec-custom-bouncer-$VERSION/config/crowdsec-custom-bouncer.yaml \
/etc/crowdsec/bouncers/crowdsec-custom-bouncer.yaml
CMD ["/usr/bin/crowdsec-custom-bouncer", "-c", "/etc/crowdsec/bouncers/crowdsec-custom-bouncer.yaml"]
Alternatively just providing that sample Dockerfile in the docs would be nice
The text was updated successfully, but these errors were encountered:
Most (all?) bouncers seem to be available as a Docker image, but not this one. Arguably depending on what the custom script is doing, a custom image will still need to be built (to install dependencies), but having an official image to extend would make the process easier.
In the meantime if anyone having the same issue, here's a sample
Dockerfile
that works for me (the custom script just needs to be mounted to thebin_path
value in the YAML config):Alternatively just providing that sample
Dockerfile
in the docs would be niceThe text was updated successfully, but these errors were encountered: