Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eckinox/caddy-waf-docker-image
Caddy Docker image built with Mercure, Vulcain and Coraza WAF modules.
https://github.com/eckinox/caddy-waf-docker-image
Last synced: 8 days ago
JSON representation
Caddy Docker image built with Mercure, Vulcain and Coraza WAF modules.
- Host: GitHub
- URL: https://github.com/eckinox/caddy-waf-docker-image
- Owner: eckinox
- Created: 2022-08-15T12:50:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-12T20:16:22.000Z (11 months ago)
- Last Synced: 2024-05-01T19:37:10.532Z (7 months ago)
- Language: Dockerfile
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Caddy builder Docker image with built-in WAF
This repository extends the default [`caddy-builder`](https://hub.docker.com/_/caddy)
Docker image and uses it to build Caddy with:- [Mercure](https://mercure.rocks/)
- [Vulcain](https://github.com/dunglas/vulcain)
- [Coroza WAF for Caddy](https://github.com/corazawaf/coraza-caddy)To use it in your projects, simply `COPY` the `/usr/bin/caddy` from this image
to your own container, and set up any additional configurations you may need.## Sample usage
```dockerfile
# Copy Caddy from the pre-built Caddy image
COPY --from=eckinox/caddy-waf /usr/bin/caddy /usr/bin/caddy# Add assets for Mercure
COPY --from=dunglas/mercure:v0.11 /srv/public /srv/mercure-assets/# Copy over your Caddyfile
COPY path/to/your/Caddyfile /etc/caddy/Caddyfile# Add Coraza Web Application Firewall configurations
COPY path/to/your/coraza.conf /etc/caddy/coraza.conf
# Download the core ruleset to your Coraza WAF configurations
RUN wget -O coreruleset.zip https://github.com/coreruleset/coreruleset/archive/refs/tags/v3.3.2.zip; \
unzip coreruleset.zip; \
rm coreruleset.zip; \
mv coreruleset-* /etc/caddy/coreruleset;# Start the Caddy server
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
```## Related resources
- [Official Caddy Docker image](https://hub.docker.com/_/caddy)
- [Docker for Symfony repo](https://github.com/dunglas/symfony-docker)