Skip to content

feat: add php 7.4.33 alpine3.16 build from the patched ghcr base - #5

Merged
hoangbh-0986 merged 2 commits into
masterfrom
feat/php-7.4.33-patched-alpine3.16
Nov 5, 2026
Merged

hoangbh-0986 merged 2 commits into
masterfrom
feat/php-7.4.33-patched-alpine3.16

Conversation

@hoangbh-0986

Copy link
Copy Markdown
Contributor

Why

php-dev:7.4-* runs PHP 7.4.30, which is vulnerable to CVE-2026-109618 and CVE-2026-109619 (PHP2Shell, unauthenticated RCE). sun-asterisk-research/docker-php#6 published patched php:7.4.33-*-alpine3.16 images. This PR adds a php-dev 7.4.33 build on top of them for CI, the same way #4 did for 8.1.

What changes

  • New optional list key pecl_packages in the versions files, default xdebug pcov. Each item is a PECL name with an optional -<version>; items are validated before anything is generated, and the docker-php-ext-enable list is derived from the names. Without the key, every generated file is byte-identical to master.
  • New versions_7.4.yml builds 7.4/alpine3.16 from ghcr.io/sun-asterisk-research/php:7.4.33-nginx-alpine3.16, pinned by digest (sha256:ccd57c94…2061):
    • exact_tags_only: only 7.4.33-alpine3.16 (a new tag), linux/amd64, no Docker Hub.
    • pecl_packages: xdebug-3.1.6 and pcov-1.0.12, because current xdebug needs PHP 8.
  • 7.4.30 leaves versions.yml (8.0.22 stays). The 7.4.30 tags (7.4-alpine, 7.4-bullseye, 7.4, 7, … on ghcr and Docker Hub) stop being rebuilt and keep their current, unpatched digests.
  • The 7.4 workflow declares its token permissions like the 8.1 one.
  • Other versions (7.3, 8.0, 8.1, 8.2) are unchanged.

Verification (local, amd64)

  • make all with the new key but no versions change: no generated file changes. An invalid item (*, pcov;rm) or a missing base_image_sha256 makes make all exit 2 without touching the tree.
  • Image: PHP 7.4.33 with the patches label, Xdebug 3.1.6, pcov 1.0.12, Composer 2.4.1, git; docker-php-ext-disable xdebug removes it; apart from xdebug/pcov, php -m matches laravel-base:7.4.33-alpine3.16.
  • Note: the image has no phpdbg; use pcov for coverage.

New optional list key pecl_packages (default: xdebug pcov). Items are a
PECL name with an optional -<version>, validated before anything is
generated; the docker-php-ext-enable list is derived from the names.
Generated files are unchanged when the key is not set.
New versions_7.4.yml builds 7.4/alpine3.16 from
ghcr.io/sun-asterisk-research/php:7.4.33-nginx-alpine3.16 pinned by digest,
publishing only 7.4.33-alpine3.16 for amd64, without Docker Hub. xdebug is
pinned to 3.1.6 and pcov to 1.0.12 because current xdebug needs PHP 8.
7.4.30 leaves versions.yml; its tags stop being rebuilt and keep their
current digests.
@hoangbh-0986
hoangbh-0986 merged commit 7c90466 into master Nov 5, 2026
4 checks passed
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