OpenConext / OpenConext-BaseContainers

Docker base images used by all OpenConext projects that use docker containers
Apache License 2.0
0 stars 1 forks source link

Added an example Dockerfile using Debian #19

Open danakim opened 10 months ago

danakim commented 10 months ago

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:

danakim commented 10 months ago

@quartje - I checked and you can actually install xdebug via that Sury repo. It is as simple as: apt-get install php7.2-xdebug (php8.2).