Closed redRolf closed 2 years ago
Changeing the image name to:
FROM owasp/modsecurity-crs@sha256:830e5cc033d3034771a830977bc6dcfdb57f3647edb1aa0dc9fad56e900ff779
Allowed me to use an older image that still worked.
Hi @redRolf !
I'm sorry to hear that something is broken. To solve this, take a look here.
We will probably be porting that documentation part to this image.
Best, Felipe.
In essence, you need to change this:
COPY ./etc/nginx/nginx.conf /etc/nginx/nginx.conf.template
COPY ./etc/nginx/conf/default-server.conf /etc/nginx/conf/default-server.conf
To something that keeps the structure you want under /etc/nginx/templates
:
COPY ./etc/nginx/nginx.conf /etc/nginx/templates/nginx.conf.template
COPY ./etc/nginx/conf/default-server.conf /etc/nginx/templates/conf.d/default-server.conf
@fzipi I am so sorry, I only got back to you now. But I finally found the time to fix the issue :) Your tips on changing the location and name of the nginx.conf helped a lot.
The final puzzle piece was though, that running CMD cron && nginx -g "daemon off;"
at the end of the docker file no longer works with the new NGINX container.
any additional services that are to be startet along with the like crond
in my case need to be placed in an entry point script, that is placed within then /docker-entrypoint.d/
directory, like so:
# Setup entrypoint scripts
# Scripts in ./docker-entrypoint.d/ are automatically executed by the new nginx entrypoint script, see:
# https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/docker-entrypoint.sh
COPY ./docker-entrypoint.d/*.sh /docker-entrypoint.d/
RUN chmod +x /docker-entrypoint.d/*.sh
Running any sort of CMD
command when extending the new NGINX container breaks NGINX 😇
Thank you again for your help :) have a great week. Hope this helps some one.
Excellent, good to know! I will add this to the general readme, for sure it might help someone!
Since you latest update the following things do not work any more:
In short the image became unusable...
Why is this setup no longer working? I just don't understand why this no longer works, as there is an NGINX running in their some where...
Here are my Docker file and nginx.conf
Docker File
NGINX Conf