Repository navigation
Build Adminer on the Apache variant of wodby/php - #22
Merged
Merged
Conversation
The image was built on the official Debian php:8.4-apache image, unlike the other Wodby PHP images, and its base wasn't pinned. It now uses wodby/php:8.4-apache, pinned by digest, where Apache passes PHP to PHP-FPM in the same container. Designs and plugins are set up by an init script the wodby/php entrypoint sources, and PHP limits use wodby/php's own variables. The container still starts as root, so it runs where privilege escalation is disallowed; Apache and PHP-FPM serve requests as www-data. A new test covers that case.
wodby/php r12 is the first release with the Apache variant. Its 8.4-apache-r12 digest is the base of this image.
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.
Problem
The Adminer image is built on the official Debian-based
php:8.4-apacheimage, unlike the other Wodby PHP images. It doesn't get the Alpine package updates, PHP builds and security scanning thatwodby/phpimages get, and its base isn't pinned, so every rebuild may pick up a different base.Cause
Adminer needs a web server and PHP in one container, and until now
wodby/phponly ran PHP-FPM.Solution
Build Adminer on the new Apache variant of
wodby/php(8.4), pinned by digest like the other images. Apache serves Adminer and passes PHP to PHP-FPM in the same container. Port 80,ADMINER_*variables, designs, plugins and PHP limits work as before. The container still starts as root, so it keeps running where privilege escalation is disallowed, as the Kubernetes chart sets; Apache and PHP-FPM serve requests aswww-data.Details
base-images.mkpinswodby/php:8.4-apache-rN; the workflow setsBASE_IMAGE_REVISION.entrypoint.shbecomesinit/20-adminer.sh, which thewodby/phpentrypoint sources before the main command. An unknown design or plugin still stops the container before it serves requests.PHP_FPM_CLEAR_ENV=no, because Adminer reads its login defaults withgetenv()andwodby/phpclears PHP-FPM's environment by default.adminer.iniis gone:wodby/phpreadsPHP_MAX_EXECUTION_TIME,PHP_MEMORY_LIMIT,PHP_POST_MAX_SIZEandPHP_UPLOAD_MAX_FILESIZEitself.APACHE_FCGI_PROXY_TIMEOUTis one day, so long imports and exports aren't cut off by Apache while PHP's own limit is 0./etc/apache2/conf.d/*.conf, as the README now explains.--security-opt no-new-privileges, and Apache and PHP-FPM serving aswww-data.Validation
Built locally on arm64 on the published, digest-pinned
wodby/php:8.4-apache-r12.make testpasses:Before merging
This repository builds only on
masterand tags, so CI first runs after the merge.