symfony-docker icon indicating copy to clipboard operation
symfony-docker copied to clipboard

Simplify php extensions installation process

Open vonalbert opened this issue 3 years ago • 2 comments

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?

vonalbert avatar Aug 05 '22 05:08 vonalbert

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?

dunglas avatar Aug 05 '22 07:08 dunglas

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

maxhelias avatar Aug 08 '22 08:08 maxhelias

Example on Sylius docker : https://github.com/Sylius/Sylius-Standard/pull/746

maxhelias avatar Sep 15 '22 09:09 maxhelias

Let's do this then. This script is reference in the official readme by the way.

dunglas avatar Sep 16 '22 00:09 dunglas

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.

vonalbert avatar Sep 16 '22 08:09 vonalbert

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 :)

bogdaniel avatar Jan 14 '23 13:01 bogdaniel