lorisleiva / laravel-docker

🐳 Generic docker image for Laravel Applications
MIT License
927 stars 312 forks source link

Use `docker-php-extension-installer` to install dependencies #94

Closed lukasleitsch closed 2 years ago

lukasleitsch commented 2 years ago

Currently, all the dependencies are installed manually in the docker images. Finding and maintain the dependencies for all the PHP extensions can be a mess. A quote of the official PHP docker image:

If you are having difficulty figuring out which Debian or Alpine packages need to be installed before docker-php-ext-install, then have a look at the install-php-extensions project. This script builds upon the docker-php-ext-* scripts and simplifies the installation of PHP extensions by automatically adding and removing Debian (apt) and Alpine (apk) packages. For example, to install the GD extension you simply have to run install-php-extensions gd. This tool is contributed by community members and is not included in the images, please refer to their Git repository for installation, usage, and issues.

@lorisleiva What do you think to install the PHP extensions with the helper docker-php-extension-installer? I would create a PR for this.

https://github.com/mlocati/docker-php-extension-installer

lorisleiva commented 2 years ago

Oh, that's awesome! I didn't know about this project. Let's do it, thanks! 🔥