Repository navigation
Upgrade dockerize to v0.15.2 - #135
Merged
Merged
Conversation
Upgrade jwilder/dockerize from v0.9.3 to v0.15.2. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Since v0.10 the dockerize release tarball also ships LICENSE and README.md. We only moved the binary out, and WORKDIR /app is set before this step, so both files were left in /app of every image (and of every prod app that doesn't ship its own copies). tar also restored the archive's owner, so /usr/local/bin/dockerize was owned by uid 1001 (501 with v0.9.3). The entrypoint runs dockerize as root on every start, so when ASUSER matched that uid the kool user could replace it and get root on the next restart. Extract just the binary straight into /usr/local/bin, without restoring ownership, and assert both in test-image.sh. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The focused installation changes are consistent across templates and generated files, with targeted regression checks and no unresolved findings.
No open issues 🎉
What changed in this PR
Upgrades dockerize to v0.15.2 across the PHP images and hardens installation by keeping the binary root-owned and excluding bundled documentation.
Changes:
- Update both Dockerfile templates and all generated variants to v0.15.2.
- Extract only
dockerizeinto/usr/local/binwithout preserving archive ownership. - Add regression checks for
0:0ownership and absence of archive documentation in/app.
| File | Description |
|---|---|
template/Dockerfile.blade.php |
Update and harden Alpine installation template. |
template/Dockerfile-debian.blade.php |
Update and harden Debian installation template. |
scripts/test-image.sh |
Check binary ownership and clean /app contents. |
8.5/Dockerfile |
Apply updated installation to PHP 8.5 Alpine. |
8.5-prod/Dockerfile |
Apply updated installation to PHP 8.5 Alpine production. |
8.5-debian/Dockerfile |
Apply updated installation to PHP 8.5 Debian. |
8.5-debian-prod/Dockerfile |
Apply updated installation to PHP 8.5 Debian production. |
8.4/Dockerfile |
Apply updated installation to PHP 8.4 Alpine. |
8.4-prod/Dockerfile |
Apply updated installation to PHP 8.4 Alpine production. |
8.4-debian/Dockerfile |
Apply updated installation to PHP 8.4 Debian. |
8.4-debian-prod/Dockerfile |
Apply updated installation to PHP 8.4 Debian production. |
8.3/Dockerfile |
Apply updated installation to PHP 8.3 Alpine. |
8.3-prod/Dockerfile |
Apply updated installation to PHP 8.3 Alpine production. |
8.2/Dockerfile |
Apply updated installation to PHP 8.2 Alpine. |
8.2-prod/Dockerfile |
Apply updated installation to PHP 8.2 Alpine production. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/usr/local/binand don't keep the archive's file owner. Since v0.10 the release tarball also shipsLICENSEandREADME.md.WORKDIR /appis set before this step, so Atualização do Jwilder Dockerize para versão 0.15.2 #134 alone would have left both files in/appof every image, and of every prod app that doesn't ship its own copies.test-image.shcheck that/usr/local/bin/dockerizeis owned by0:0and that/apphas noLICENSE/README.md.The ownership problem is not new. The published images ship dockerize owned by
501:20, the uid baked into the v0.9.3 tarball, and #134 would have changed that to1001:1001. The entrypoint runs dockerize as root on every start. So whenASUSERmatched the owning uid (501 is the default macOS user; 1001 is the GitHub Actions runner and the usual second Linux user), thekooluser, which runs the php-fpm workers, could overwrite the binary and get root on the next container restart.Upstream changes between the two versions don't affect how these images use dockerize (only
-templatein the entrypoints):kool.ini,zz-docker.confanddefault.confrender byte-identical to v0.9.3 on8.4-nginx,8.4-nginx-prodand8.4-debian-nginx, andnginx -t/php-fpm -tpass.<no value>.-waitbehaves the same on success and on timeout. Running a command still passes its exit code through. Both binaries are still statically linked.isTruenow treatsyes/onas true. In these templates that only affectsNGINX_HTTPS.This deliberately stops at v0.15.2. v0.16.0 rejects flag combinations it used to ignore and validates
-waitURLs and timeouts at startup, which could break downstreamdockerize -waitcommand lines. It deserves its own PR.Tested locally: built
8.4and8.4-debianfrom this branch and the fulltest-image.shpasses on both. The generated Dockerfiles match the templates. The-prod/-nginxvariants weren't built locally; their install line is the same, and CI builds the full matrix.🤖 Generated with Claude Code