Added an example Dockerfile using Debian #19
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.
Hi @quartje ! When working on that ticket to remove gcc and other build tools from the images, we discussed the possibility of using plain Debian as a base for the php + apache images as well (like we do with the plain Apache2 images), as opposed to the official PHP image.
I have opened this branch and PR with an example Dockerfile in each of the php-apache images that uses Debian as a base. The files are called
Dockerfile.debian
. You will see that they are not as different as you would expect. The big difference is that Debian comes by default with PHP 7.4. We need PHP 7.2 and 8.2 The semi-official - and recommended by Debian - way to install various other versions of PHP is by using the Sury repository: https://deb.sury.org/. Adding this repo to the OS not only allows us to install various versions of PHP but also install them in parallel if we ever need to.I have successfully used this repo in a lot of other projects, never ran into issues and especially security issues. I will leave it to you to evaluate if you want to use it. My recommendation would be to switch to this:
apt-get install php7.2-xdebug
, no need to involve pecl in the mix