Skip to content

Switch Apache Debian image to Docker hardened image (dhi.io/httpd)#420

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/switch-apache-debian-to-hardened-image
Draft

Switch Apache Debian image to Docker hardened image (dhi.io/httpd)#420
Copilot wants to merge 3 commits intomainfrom
copilot/switch-apache-debian-to-hardened-image

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 27, 2026

  • Update docker-bake.hcl: change the Apache Debian variant's runtime image to dhi.io/httpd:${httpd-version}, add build_image = httpd:${httpd-version} for build stages, add build_image to alpine entry too (same as image), propagate build_image context in the target
  • Update apache/Dockerfile: replace FROM image AS build and FROM image AS crs_release with FROM build_image; add FROM build_image AS runtime_deps stage that installs runtime packages and collects them into /staging/ via dpkg -L; replace the apt-get install block in the final stage with COPY --from=runtime_deps /staging/ /; remove RUN useradd --system httpd; change httpdwww-data for chown and USER directive; remove gnupg from runtime; add USER root before the privileged setup RUN block (needed since the hardened image defaults to www-data)
  • Update .github/workflows/publish.yml: add docker/login-action step to authenticate to dhi.io registry using existing Docker Hub credentials
  • Update .github/workflows/verifyimage.yml: add docker/login-action step to authenticate to dhi.io registry
  • Update README.md: note the Apache Debian variant now uses the Docker hardened base image

Copilot AI linked an issue Apr 27, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update Apache Debian image to use hardened version Switch Apache Debian image to Docker hardened image (dhi.io/httpd) Apr 27, 2026
Copilot AI requested a review from fzipi April 27, 2026 23:04
@fzipi
Copy link
Copy Markdown
Member

fzipi commented Apr 28, 2026

@copilot fix the ci

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3693f59f-36a4-4ef4-af43-fc7f48176a77

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot/switch-apache-debian-to-hardened-image

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 28, 2026

@copilot fix the ci

Fixed in d2ee167. The hardened dhi.io/httpd image defaults to running as www-data, so the mkdir/sed/chown setup step was failing with "Permission denied". Added USER root before that RUN block (matching the pattern used in the nginx Dockerfile), then USER www-data is restored at the end.

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.

Switch apache debian image to hardened image

2 participants