From a380af274fc34bd75c86669dfb3843c4ef5b2dc1 Mon Sep 17 00:00:00 2001 From: elAgala Date: Mon, 3 Mar 2025 22:36:30 -0300 Subject: [PATCH] Update Caddy with Layer4 plugin --- Makefile | 4 ++++ images/caddy_full/Dockerfile | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dd3b5b9 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +build-caddy: + @echo "Building Caddy FULL image" + docker build -t ghcr.io/elagala/server-initializer/caddy-waf-crowdsec:latest -f images/caddy_full/Dockerfile . + docker push ghcr.io/elagala/server-initializer/caddy-waf-crowdsec:latest diff --git a/images/caddy_full/Dockerfile b/images/caddy_full/Dockerfile index 43620d4..576628a 100644 --- a/images/caddy_full/Dockerfile +++ b/images/caddy_full/Dockerfile @@ -4,14 +4,15 @@ FROM caddy:builder AS builder # Install xcaddy and build Caddy with plugins RUN xcaddy build \ --with github.com/corazawaf/coraza-caddy/v2@v2.0.0 \ - --with github.com/hslatman/caddy-crowdsec-bouncer/http@v0.8.1 + --with github.com/hslatman/caddy-crowdsec-bouncer/http@v0.8.1 \ + --with github.com/mholt/caddy-l4 # Stage to download OWASP CRS FROM alpine:latest AS crs RUN apk add --no-cache git && \ - git clone --depth 1 --branch v4.0.0 \ - https://github.com/coreruleset/coreruleset.git /coreruleset && \ - mv /coreruleset/crs-setup.conf.example /coreruleset/crs-setup.conf + git clone --depth 1 --branch v4.0.0 \ + https://github.com/coreruleset/coreruleset.git /coreruleset && \ + mv /coreruleset/crs-setup.conf.example /coreruleset/crs-setup.conf # Final stage FROM caddy:latest