Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/update_docker_hub_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: (push-master) Update Docker Hub README

on:
push:
branches:
- master
paths:
- 'docker/README.md'

jobs:
update-docker-hub-readme:
runs-on: ubuntu-latest
steps:

-
name: Check out the repo
uses: actions/checkout@v4
if: ${{ github.repository_owner == 'crowdsecurity' }}

-
name: Update docker hub README
uses: peter-evans/dockerhub-description@v4
if: ${{ github.repository_owner == 'crowdsecurity' }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: crowdsecurity/crowdsec
short-description: ${{ github.event.repository.description }}
readme-filepath: "./docker/README.md"
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY . .
RUN make build DOCKER_BUILD=1

FROM alpine:3.21
COPY --from=build /go/src/cs-custom-bouncer/crowdsec-custom-bouncer /usr/local/bin/crowdsec-custom-bouncer
COPY --from=build /go/src/cs-custom-bouncer/config/crowdsec-custom-bouncer.yaml /etc/crowdsec/bouncers/crowdsec-custom-bouncer.yaml
COPY --from=build /go/src/cs-custom-bouncer/crowdsec-custom-bouncer /crowdsec-custom-bouncer
COPY --from=build /go/src/cs-custom-bouncer/config/crowdsec-custom-bouncer.yaml /crowdsec-custom-bouncer.yaml

ENTRYPOINT ["/usr/local/bin/crowdsec-custom-bouncer", "-c", "/etc/crowdsec/bouncers/crowdsec-custom-bouncer.yaml"]
ENTRYPOINT ["/crowdsec-custom-bouncer", "-c", "/crowdsec-custom-bouncer.yaml"]
23 changes: 23 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Quick reference

CrowdSec bouncer to use custom scripts.

For all the options, refer to the documentation: https://docs.crowdsec.net/u/bouncers/custom/

To use the container image, mount your configuration and the script that will receive decision notifications.


```bash
$ cat config.yaml
bin_path: /custom-script
feed_via_stdin: true # Invokes binary once and feeds incoming decisions to it's stdin.
total_retries: 3
log_mode: stdout
api_url: http://127.0.0.1:8080/
api_key: "......"
$ docker run \
--network host \
-v $(pwd)/config.yaml:/crowdsec-custom-bouncer.yaml \
-v $(pwd)/custom-script:/custom-script crowdsecurity/cs-custom-bouncer:latest
...
```