Skip to content

Strip the build toolchain from the Docker runtime image (1.4.20)#120

Merged
fabiodalez-dev merged 1 commit into
mainfrom
chore/docker-strip-build-toolchain
Jul 8, 2026
Merged

Strip the build toolchain from the Docker runtime image (1.4.20)#120
fabiodalez-dev merged 1 commit into
mainfrom
chore/docker-strip-build-toolchain

Conversation

@fabiodalez-dev

Copy link
Copy Markdown
Owner

Follow-up to #118: the runtime image still carried the php base image's PHPIZE_DEPS build toolchain (gcc, g++, make, autoconf, dpkg-dev, linux-libc-dev kernel headers, …). Nothing compiles at runtime, and those packages were the single largest CVE surface scanners flag — linux-libc-dev alone accounted for 35 CRITICAL/HIGH findings, all in unreachable code.

Purging the toolchain after install-php-extensions drops the trivy counts from CRITICAL 15 / HIGH 150 / MEDIUM 482 to CRITICAL 14 / HIGH 116 / MEDIUM 241. Every remaining finding has no fix available in Debian trixie yet (affected/fix_deferred), and the app layer (npm/composer) reports zero vulnerabilities.

Verified in the built image: imagick/gd/intl/zip load, AVIF and HEIC encode succeed, Apache serves, translation seeding and the installer behave as before. Version bumped to 1.4.20 for the image release tag.

The php base image ships PHPIZE_DEPS (gcc, g++, make, autoconf, dpkg-dev,
kernel headers, …) so extensions can compile at build time; none of it is
needed at runtime. Purging it after install-php-extensions removes the
largest CVE surface scanners flag on the image — linux-libc-dev alone
accounted for 35 CRITICAL/HIGH findings; the sweep drops HIGH 150 -> 116
and halves MEDIUM (482 -> 241). Verified in the built image: imagick/gd/
intl/zip load, AVIF and HEIC encode work, the installer and translation
seeding behave as before.

Anyone extending the image with more PHP extensions should keep using
install-php-extensions, which fetches its own build dependencies.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@fabiodalez-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 736c21fc-3013-448e-b507-7167e5a27fa5

📥 Commits

Reviewing files that changed from the base of the PR and between e0372d1 and 4555553.

📒 Files selected for processing (2)
  • Dockerfile
  • version.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/docker-strip-build-toolchain

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@fabiodalez-dev
fabiodalez-dev merged commit f9cf85f into main Jul 8, 2026
3 of 4 checks passed
@fabiodalez-dev
fabiodalez-dev deleted the chore/docker-strip-build-toolchain branch July 8, 2026 15:03
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.

1 participant