Repository navigation
Build PHP from source so security releases don't wait on Docker Hub - #728
jaydrogers wants to merge 8 commits into
Conversation
A bare "set -oe" turns on exit-on-error but also prints the shell's option table. Found by @tomschlick in #726.
Deploying serversideup-php with
|
| Latest commit: |
df5875b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0ec04b5b.serversideup-php.pages.dev |
| Branch Preview URL: | https://build-from-source.serversideup-php.pages.dev |
Images for PR #728
Try it: docker run --rm -v "$PWD:/var/www/html" -p 8080:8080 serversideup/php-dev:728-8.5-fpm-nginxEvery image is on Docker Hub as All images with sizesSizes are compressed, per architecture.
Updated on every push to this PR. |
Even if not right now this is something keep in mind and review later. Tags pushed to Github should also be fixed forever. Otherwise an attacker which succeeded taking over an account can recreate existing tags with malicious changes. |
Already set with immutable tags. Security begins without even trusting yourself 😅 |
Hm, can you elaborate on that? I was exactly referring to immutable tags but the quoted text indicates that tags can be removed and pushed again, pointing at a different change than the original broken tag. You see me confused. ;-) |
What
This is a draft to test the plan from #727 in CI before we commit to it. We compile PHP ourselves from php.net into
serversideup/php-baseand build every image on it, so a PHP security release no longer waits on Docker Hub.Why
For the PHP2Shell fix, our images went live 4 hours and 20 minutes after php.net published the source. Our own build took 27 minutes. The rest was waiting on the official images, PECL, and a one-off v4 workflow.
What changes
php-baserenders docker-library's own template, vendored unchanged insrc/base/upstream. Our only changes are five small patches inscripts/generate-php-base.sh, like reading the release managers' keys from the repo instead of a keyserver.scripts/test-base-image.shchecks it against the official image.redisextension builds from pinned phpredis commits on GitHub.8.4-fpm-nginxonly move for the newest release. Older versions get release tags only.This is meant to ship as v5.1. Users get the same tags, paths, and
docker-php-ext-*andinstall-php-extensionstooling.How to test
Build an image on PHP compiled from source:
The first CI run on this PR compiles all 44 base images into
serversideup/php-dev. That run also tells us what this costs on Depot.Notes for reviewers
set -oebug.