TrafeX / docker-php-nginx

Docker image with PHP-FPM 8.3 & Nginx 1.24 on Alpine Linux
https://hub.docker.com/r/trafex/php-nginx
MIT License
1.33k stars 721 forks source link

Make php packages easier to upgrade #170

Closed sergey-gr closed 4 months ago

sergey-gr commented 5 months ago

As the title says... I made php version change process easier. It requires to change only one variable value to be switched to new php version.

It also set correct php-fpm version in supervisord configuration file.

Hope this changes will be useful.

jimsihk commented 4 months ago

I have similar change in my version and share here to see if it would be more flexible on the ini file and php-fpm location:

ARG PHP_V=82
ENV PHP_RUNTIME=php${PHP_V}
ENV PHP_FPM_RUNTIME=php-fpm${PHP_V}
...
    && if [ ! -L /usr/bin/php ]; then ln -s /usr/bin/${PHP_RUNTIME} /usr/bin/php; fi \
    && if [ -d /etc/${PHP_RUNTIME} ]; then mv /etc/${PHP_RUNTIME} /etc/php && ln -s /etc/php /etc/${PHP_RUNTIME}; fi \
    && if [ ! -L /usr/sbin/php-fpm ]; then ln -s /usr/sbin/${PHP_FPM_RUNTIME} /usr/sbin/php-fpm; fi \