Repository navigation
[FEATURE] Install file in the PHP images - #603
Merged
Merged
Conversation
The PHP images get the command file, which tells the type of a file. Tools such as GrumPHP's BOM check call it; the Alpine images had none. In the Debian images it came with $PHPIZE_DEPS of the official image and is now installed explicitly.
misc::file checks in every PHP image that file runs and tells a PHP script from a binary. AGENTS.md asks for such a test, and for the size increase in the pull request description, whenever a package is added.
|
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.



Summary
The PHP images (
php,php-apache,php-nginxand their-devimages) get the commandfile, which tells the type of a file; tools such as GrumPHP's BOM check call it. The Alpine images had none; in the Debian images it came with$PHPIZE_DEPSof the official image and is now installed explicitly. A serverspec test checks it in every PHP image, and AGENTS.md asks for such a test whenever a package is added.Size
Only the 24 Alpine PHP images grow; the Debian images already had
file.magic.mgc; +1.7 % forphp:8.x-alpineChanges
template/Dockerfile/images/php.jinja2:fileinofficial()andofficialAlpine();docker/php-official/*/Dockerfileregenerated withmake provisiontests/serverspec:misc::filerunsfileand checks that it tells a PHP script from a binary;collection::phpincludes itdocs/customization.md:filein "Tools for your Dockerfile"How it was verified
make provision,ci/console github:generate-ciandreadme-banner:generate: only the eightphp-officialDockerfiles changemisc::filewithserverspec.sh: passes onphp:8.5, fails on the publishedphp:8.5-alpinewithoutfile, passes withfileinstalledphp-official/8.5-alpineinstallsfile5.47;file --mime-typeworks in the Alpine and Debian images