Fix docker-compose.yml to support Docker Compose v2 by adding service…#64
Open
oussama134 wants to merge 1 commit intoOWASP:masterfrom
Open
Fix docker-compose.yml to support Docker Compose v2 by adding service…#64oussama134 wants to merge 1 commit intoOWASP:masterfrom
oussama134 wants to merge 1 commit intoOWASP:masterfrom
Conversation
|
Hi, I wanted to inform you that the changes proposed in this PR have already been addressed and included in my other recent pull requests. To avoid duplication and keep the contributions streamlined, I would advise to close this pr Thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I updated docker-compose.yml to work with Docker Compose v2. The old file used the old format (services at the root level), which caused validation errors like:
text
additional properties 'modsec_crs' not allowed
Now everything is wrapped under services: like Compose expects.
Does it build?
Not completely, but that’s not because of this PR.
The compose file is now valid — you can see that by running docker compose config, which shows a clean structure. However, when you actually try to build (docker compose up --build), it fails because the Dockerfile for modsec_crs uses:
That image is no longer available on Docker Hub. The build stops with a not found error.
So the fix I made solves the compose format problem, but there’s a separate issue with the base image. I didn’t touch that because it’s unrelated — I wanted to keep this PR focused on the compose v2 compatibility.
Next pull rqst ?
The project needs to either:
Find a maintained ModSecurity base image that replaces owasp/modsecurity-crs, or
Adjust the Dockerfile to build from something else (like ubuntu + install ModSecurity).
Happy to help with that in a follow‑up PR if needed.