Browse Source

Update laravel and lument to php 7.4 (#5329)

Joan Miquel 5 years ago
parent
commit
da72c97d24

+ 2 - 2
frameworks/PHP/laravel/laravel-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
@@ -19,7 +19,7 @@ RUN chmod -R 777 /laravel
 RUN echo "APP_SWOOLE=true" >> .env
 
 # Install composer using the installation method documented at https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
-# This method was chosen because composer is not part of the apt repositories that are in the default PHP 7.3 docker image
+# This method was chosen because composer is not part of the apt repositories that are in the default PHP 7.4 docker image
 # Adding alternate apt php repos can potentially cause problems with extension compatibility between the php build from the docker image and the alternate php build
 # An additional benefit of this method is that the correct version of composer will be used for the environment and version of the php system in the docker image
 RUN deploy/swoole/install-composer.sh

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

@@ -1,21 +1,21 @@
-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
-RUN apt-get install -yqq php7.3-mbstring php7.3-xml  > /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 php7.4-mbstring php7.4-xml  > /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 ./ /laravel
 WORKDIR /laravel
 
-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 mkdir -p /laravel/bootstrap/cache
 RUN mkdir -p /laravel/storage/framework/sessions
@@ -31,5 +31,5 @@ RUN php artisan route:cache
 
 RUN chmod -R 777 /laravel
 
-CMD service php7.3-fpm start && \
+CMD service php7.4-fpm start && \
     nginx -c /laravel/deploy/nginx.conf -g "daemon off;"

+ 1 - 1
frameworks/PHP/lumen/lumen-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

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

@@ -1,21 +1,21 @@
-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
-RUN apt-get install -yqq php7.3-mbstring php7.3-xml  > /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 php7.4-mbstring php7.4-xml  > /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 ./ /lumen
 WORKDIR /lumen
 
-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
 
@@ -26,5 +26,5 @@ RUN mkdir -p /lumen/storage/framework/cache
 
 RUN chmod -R 777 /lumen
 
-CMD service php7.3-fpm start && \
+CMD service php7.4-fpm start && \
     nginx -c /lumen/deploy/nginx.conf -g "daemon off;"