Switch Apache Debian image to Docker hardened image (dhi.io/httpd)#420
Switch Apache Debian image to Docker hardened image (dhi.io/httpd)#420
Conversation
Agent-Logs-Url: https://github.com/coreruleset/modsecurity-crs-docker/sessions/a01215c0-b9eb-42e6-b191-fceaffabbfc8 Co-authored-by: fzipi <3012076+fzipi@users.noreply.github.com>
|
@copilot fix the ci |
…l stage Agent-Logs-Url: https://github.com/coreruleset/modsecurity-crs-docker/sessions/b8dfba58-0518-4bbe-92a4-42975b9882fe Co-authored-by: fzipi <3012076+fzipi@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Fixed in d2ee167. The hardened |
docker-bake.hcl: change the Apache Debian variant's runtimeimagetodhi.io/httpd:${httpd-version}, addbuild_image = httpd:${httpd-version}for build stages, addbuild_imageto alpine entry too (same asimage), propagatebuild_imagecontext in the targetapache/Dockerfile: replaceFROM image AS buildandFROM image AS crs_releasewithFROM build_image; addFROM build_image AS runtime_depsstage that installs runtime packages and collects them into/staging/viadpkg -L; replace theapt-get installblock in the final stage withCOPY --from=runtime_deps /staging/ /; removeRUN useradd --system httpd; changehttpd→www-datafor chown and USER directive; removegnupgfrom runtime; addUSER rootbefore the privileged setup RUN block (needed since the hardened image defaults to www-data).github/workflows/publish.yml: adddocker/login-actionstep to authenticate todhi.ioregistry using existing Docker Hub credentials.github/workflows/verifyimage.yml: adddocker/login-actionstep to authenticate todhi.ioregistryREADME.md: note the Apache Debian variant now uses the Docker hardened base image