bitnami / minideb

A small image based on Debian designed for use in containers
https://bitnami.com
Apache License 2.0
2.08k stars 178 forks source link

PHP selector option #85

Closed momon closed 2 years ago

momon commented 4 years ago

Hello folks, I've been using this source for a while as the base OS for our applications and it has been working wonderfully, thank you so much for your support and efforts.

We are looking to enhance this a bit for our development environment and I am trying to figure out what would be the ideal way to implement this. We are looking to have different PHP versions available within the OS so we can test out different features in our software with minimal effort. I am aware I can just install the desired php versions on the OS but I am somewhat curious what the recommendation would be from you guys thinking down the road on what would be easiest to maintain.

My options:

1) Using env variables to define the PHP version to install and load when the app is setup. 2) Installing multiple PHP versions in the OS and running a script on the OS to switch the PHP version (I've seen this implemented in numerous control panels, I am guessing in this case I would need a local script to adjust the config and restart apache).

For reference, I am currently installing PHP on the dockerfile as such:

RUN bitnami-pkg unpack php-7.4.5-1 --checksum 4b826aa38a275f5c6c2e752e9ffa5972d61da43094fa4215170475a1690685e8

And I am using this image as the base for our implementation:

FROM docker.io/bitnami/minideb:buster

Appreciate the guidance.

Cheers,

beltran-rubo commented 3 years ago

Hi @momon, sorry for the delay, I think the best option is to use the PHP-FPM containers Bitnami maintains up-to-date for several versions, that way you can validate your apps replacing one with other, see https://github.com/bitnami/bitnami-docker-php-fpm Would that work for you?