symfony-docker
symfony-docker copied to clipboard
Simplify php extensions installation process
Since php extensions installation process is not easy and adding more of them can clutter your dockerfile making it unreadable, usually I use this script to do this task
https://github.com/mlocati/docker-php-extension-installer
This script installs and builds the extensions you need and their dependencies in a single apt/apk command and as a bonus it is both alpine and debian compatible. All you need to do is add the script to the dockerfile and execute it with the list of the required extensions.
Would you be interested in a PR?
I'm hesitating. This script is nice and could simplify the Dockerfile, but on the other hand we try to use as few external dependencies as possible and to be as close as possible from base images.
WDYT @maxhelias?
Making the Dockerfile simpler/flexible is worth taking especially for installing php extensions as long as they are low impact. This script would allow us to add a link to the list of easy-to-install extensions to make the project more accessible to people who may not be familiar with that aspect (php extension / docker) and add some value to the project without too much impact (I hope). But before, I would like to see a try of this
Example on Sylius docker : https://github.com/Sylius/Sylius-Standard/pull/746
Let's do this then. This script is reference in the official readme by the way.
It was not referenced in the php image readme back then. Good thing now it is. Anyway I could take care of it if you want.
Late to the party but this addition to the Dockerfile seems super good even if it's adding an extra external dependency. Extensions are now easier to install :)