Update to PHP 8.4

This commit is contained in:
kj 2025-02-18 06:56:07 -03:00
parent 59e4c7426e
commit 11398f0dd9

View File

@ -3,12 +3,12 @@ FROM docker.io/debian:trixie
# Instalamos systemd, mariadb, php, nginx, etc. # Instalamos systemd, mariadb, php, nginx, etc.
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y systemd systemd-sysv cron anacron nano wget curl git mariadb-server mariadb-client nginx php-fpm php-common php-gd php-mysql php-imap php-cli php-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear mcrypt imagemagick libruby libapache2-mod-python php-curl php-intl php-pspell php-sqlite3 php-tidy php-xmlrpc php-xsl memcached php-memcache php-imagick php-zip php-mbstring memcached libapache2-mod-passenger php-soap php-opcache php-apcu libapache2-reload-perl php-mcrypt && \ apt-get install -y systemd systemd-sysv cron anacron nano wget curl git mariadb-server mariadb-client nginx php-fpm php-common php-gd php-mysql php-cli php-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear mcrypt imagemagick libruby php-curl php-intl php-pspell php-sqlite3 php-tidy php-xmlrpc php-xsl memcached php-memcache php-imagick php-zip php-mbstring memcached libapache2-mod-passenger php-soap php-opcache php-apcu libapache2-reload-perl php-mcrypt && \
apt-get clean apt-get clean
# Mostrar los errores en PHP # Mostrar los errores en PHP
RUN sed -i 's/display_errors = Off/display_errors = On/' /etc/php/8.2/fpm/php.ini && \ RUN sed -i 's/display_errors = Off/display_errors = On/' /etc/php/8.4/fpm/php.ini && \
sed -i 's/error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT/error_reporting = E_ALL/' /etc/php/8.2/fpm/php.ini sed -i 's/error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT/error_reporting = E_ALL/' /etc/php/8.4/fpm/php.ini
# Eliminamos los logs de apt # Eliminamos los logs de apt
@ -21,14 +21,14 @@ RUN rm -rf \
# Habilitar servicios # Habilitar servicios
RUN systemctl enable mariadb.service && \ RUN systemctl enable mariadb.service && \
systemctl enable php8.2-fpm.service && \ systemctl enable php8.4-fpm.service && \
systemctl enable nginx.service systemctl enable nginx.service
# Copiamos la configuración para un pool de PHP que corre como root # Copiamos la configuración para un pool de PHP que corre como root
COPY php-root.conf /etc/php/8.2/fpm/pool.d/root.conf COPY php-root.conf /etc/php/8.4/fpm/pool.d/root.conf
# Habilitamos que PHP pueda correr como root # Habilitamos que PHP pueda correr como root
RUN sed -i 's/--nodaemonize/--nodaemonize --allow-to-run-as-root/' /usr/lib/systemd/system/php8.2-fpm.service RUN sed -i 's/--nodaemonize/--nodaemonize --allow-to-run-as-root/' /usr/lib/systemd/system/php8.4-fpm.service
# Comandos para ejecutar dentro de docker y crear rápido configuraciones de dominios y subdominios # Comandos para ejecutar dentro de docker y crear rápido configuraciones de dominios y subdominios
COPY bin/adddomain /usr/local/bin/adddomain COPY bin/adddomain /usr/local/bin/adddomain