Browse Source

Update to PHP 7.4 (#5328)

* Update to PHP 7.4

* Update Hamlet to php7.4 (workerman & swoole)
Joan Miquel 5 years ago
parent
commit
b97580e654

+ 5 - 5
frameworks/PHP/codeigniter/codeigniter.dockerfile

@@ -1,25 +1,25 @@
-FROM ubuntu:19.04
+FROM ubuntu:19.10
 
 ARG DEBIAN_FRONTEND=noninteractive
 
 RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
 RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 RUN apt-get update -yqq > /dev/null && \
-    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  > /dev/null
+    apt-get install -yqq nginx git unzip php7.4 php7.4-common php7.4-cli php7.4-fpm php7.4-mysql  > /dev/null
 
 RUN apt-get install -yqq composer > /dev/null
 
-COPY deploy/conf/* /etc/php/7.3/fpm/
+COPY deploy/conf/* /etc/php/7.4/fpm/
 
 ADD ./ /codeigniter
 WORKDIR /codeigniter
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.4/fpm/php-fpm.conf ; fi;
 ARG BENCHMARK_ENV
 RUN if [ ${BENCHMARK_ENV} = citrine ]; then sed -i "s|$db['default']['pconnect'] = FALSE;|$db['default']['pconnect'] = TRUE;|g" application/config/database.php ; fi;
 #RUN if [ $BENCHMARK_ENV = citrine ]; then sed -i "s|$db['default']['pconnect'] = FALSE;|$db['default']['pconnect'] = TRUE;|g" application/config/database.php ; fi;
 
 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
-CMD service php7.3-fpm start && \
+CMD service php7.4-fpm start && \
     nginx -c /codeigniter/deploy/nginx-fpm.conf -g "daemon off;"

+ 5 - 5
frameworks/PHP/fat-free/fat-free-raw.dockerfile

@@ -1,13 +1,13 @@
-FROM ubuntu:19.04
+FROM ubuntu:19.10
 
 ARG DEBIAN_FRONTEND=noninteractive
 
 RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
 RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 RUN apt-get update -yqq > /dev/null && \
-    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  > /dev/null
+    apt-get install -yqq nginx git unzip php7.4 php7.4-common php7.4-cli php7.4-fpm php7.4-mysql  > /dev/null
 
-COPY deploy/conf/* /etc/php/7.3/fpm/
+COPY deploy/conf/* /etc/php/7.4/fpm/
 
 ADD ./ /fat-free
 WORKDIR /fat-free
@@ -16,9 +16,9 @@ ENV F3DIR="/fat-free/src"
 
 RUN git clone -b 3.6.5 --single-branch --depth 1 "https://github.com/bcosca/fatfree-core.git" src
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.4/fpm/php-fpm.conf ; fi;
 
 RUN chmod -R 777 /fat-free
 
-CMD service php7.3-fpm start && \
+CMD service php7.4-fpm start && \
     nginx -c /fat-free/deploy/nginx.conf -g "daemon off;"

+ 5 - 5
frameworks/PHP/fat-free/fat-free.dockerfile

@@ -1,13 +1,13 @@
-FROM ubuntu:19.04
+FROM ubuntu:19.10
 
 ARG DEBIAN_FRONTEND=noninteractive
 
 RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
 RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 RUN apt-get update -yqq > /dev/null && \
-    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  > /dev/null
+    apt-get install -yqq nginx git unzip php7.4 php7.4-common php7.4-cli php7.4-fpm php7.4-mysql  > /dev/null
 
-COPY deploy/conf/* /etc/php/7.3/fpm/
+COPY deploy/conf/* /etc/php/7.4/fpm/
 
 ADD ./ /fat-free
 WORKDIR /fat-free
@@ -16,9 +16,9 @@ ENV F3DIR="/fat-free/src"
 
 RUN git clone -b 3.6.5 --single-branch --depth 1 "https://github.com/bcosca/fatfree-core.git" src
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.4/fpm/php-fpm.conf ; fi;
 
 RUN chmod -R 777 /fat-free
 
-CMD service php7.3-fpm start && \
+CMD service php7.4-fpm start && \
     nginx -c /fat-free/deploy/nginx.conf -g "daemon off;"

+ 6 - 6
frameworks/PHP/fuel/fuel.dockerfile

@@ -1,23 +1,23 @@
-FROM ubuntu:19.04
+FROM ubuntu:19.10
 
 ARG DEBIAN_FRONTEND=noninteractive
 
 RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
 RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 RUN apt-get update -yqq > /dev/null && \
-    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql php7.3-xml php7.3-mbstring php7.0-mcrypt  > /dev/null
+    apt-get install -yqq nginx git unzip php7.4 php7.4-common php7.4-cli php7.4-fpm php7.4-mysql php7.4-xml php7.4-mbstring php7.0-mcrypt  > /dev/null
 
 RUN apt-get install -yqq composer > /dev/null
 
-COPY deploy/conf/* /etc/php/7.3/fpm/
-RUN sed -i "s|listen = /run/php/php7.3-fpm.sock|listen = /run/php/php7.3-fpm.sock|g" /etc/php/7.3/fpm/php-fpm.conf
+COPY deploy/conf/* /etc/php/7.4/fpm/
+RUN sed -i "s|listen = /run/php/php7.4-fpm.sock|listen = /run/php/php7.4-fpm.sock|g" /etc/php/7.4/fpm/php-fpm.conf
 
 ADD ./ /fuel
 WORKDIR /fuel
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.4/fpm/php-fpm.conf ; fi;
 
 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet
 
-CMD service php7.3-fpm start && \
+CMD service php7.4-fpm start && \
     nginx -c /fuel/deploy/nginx.conf -g "daemon off;"

+ 1 - 1
frameworks/PHP/hamlet/hamlet-swoole.dockerfile

@@ -1,4 +1,4 @@
-FROM php:7.3
+FROM php:7.4
 
 RUN pecl install swoole > /dev/null && \
     docker-php-ext-enable swoole

+ 4 - 4
frameworks/PHP/hamlet/hamlet-workerman.dockerfile

@@ -1,18 +1,18 @@
-FROM ubuntu:19.04
+FROM ubuntu:19.10
 
 ARG DEBIAN_FRONTEND=noninteractive
 
 RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
 RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 RUN apt-get update -yqq > /dev/null && \
-    apt-get install -yqq php7.3 php7.3-common php7.3-cli php7.3-mysql  > /dev/null
+    apt-get install -yqq php7.4 php7.4-common php7.4-cli php7.4-mysql  > /dev/null
 
 RUN apt-get install -yqq composer > /dev/null
 
 RUN apt-get install -y php-pear php-dev libevent-dev > /dev/null
-RUN printf "\n\n /usr/lib/x86_64-linux-gnu/\n\n\nno\n\n\n" | pecl install event > /dev/null && echo "extension=event.so" > /etc/php/7.3/cli/conf.d/event.ini
+RUN printf "\n\n /usr/lib/x86_64-linux-gnu/\n\n\nno\n\n\n" | pecl install event > /dev/null && echo "extension=event.so" > /etc/php/7.4/cli/conf.d/event.ini
 
-COPY deploy/fpm/php.ini /etc/php/7.3/fpm/php.ini
+COPY deploy/fpm/php.ini /etc/php/7.4/fpm/php.ini
 
 ADD ./ /hamlet
 WORKDIR /hamlet

+ 6 - 6
frameworks/PHP/hamlet/hamlet.dockerfile

@@ -1,23 +1,23 @@
-FROM ubuntu:19.04
+FROM ubuntu:19.10
 
 ARG DEBIAN_FRONTEND=noninteractive
 
 RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
 RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 RUN apt-get update -yqq > /dev/null && \
-    apt-get install -yqq nginx git unzip php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql  > /dev/null
+    apt-get install -yqq nginx git unzip php7.4 php7.4-common php7.4-cli php7.4-fpm php7.4-mysql  > /dev/null
 
 RUN apt-get install -yqq composer > /dev/null
 
-COPY deploy/fpm/php-fpm.conf /etc/php/7.3/fpm/php-fpm.conf
-COPY deploy/fpm/php.ini /etc/php/7.3/fpm/php.ini
+COPY deploy/fpm/php-fpm.conf /etc/php/7.4/fpm/php-fpm.conf
+COPY deploy/fpm/php.ini /etc/php/7.4/fpm/php.ini
 
 ADD ./ /app
 WORKDIR /app
 
-RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.3/fpm/php-fpm.conf ; fi;
+RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/7.4/fpm/php-fpm.conf ; fi;
 
 RUN composer update --no-dev --quiet
 
-CMD service php7.3-fpm start \
+CMD service php7.4-fpm start \
     && nginx -c /app/deploy/fpm/nginx.conf -g "daemon off;"