Skip to content

Fix docker-compose.yml to support Docker Compose v2 by adding service…#64

Open
oussama134 wants to merge 1 commit intoOWASP:masterfrom
oussama134:fix/docker-compose-v2
Open

Fix docker-compose.yml to support Docker Compose v2 by adding service…#64
oussama134 wants to merge 1 commit intoOWASP:masterfrom
oussama134:fix/docker-compose-v2

Conversation

@oussama134
Copy link
Copy Markdown

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:

       FROM owasp/modsecurity-crs

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.

@Divyateja2709
Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants