Skip to content

Commit

Permalink
[php] CakePHP update to PHP-8.4 (#9411)
Browse files Browse the repository at this point in the history
  • Loading branch information
joanhey authored Nov 25, 2024
1 parent b70bdad commit cff8102
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions frameworks/PHP/cakephp/cakephp.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -7,22 +7,22 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \
apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null

RUN apt-get install -yqq nginx git unzip \
php8.3-fpm php8.3-mysql php8.3-xml php8.3-mbstring php8.3-intl php8.3-dev php8.3-curl php-xdebug > /dev/null
php8.4-fpm php8.4-mysql php8.4-xml php8.4-mbstring php8.4-intl php8.4-dev php8.4-curl php-xdebug > /dev/null

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

COPY deploy/conf/* /etc/php/8.3/fpm/
COPY deploy/conf/* /etc/php/8.3/cli/
COPY deploy/conf/* /etc/php/8.4/fpm/
COPY deploy/conf/* /etc/php/8.4/cli/

ADD ./ /cakephp
WORKDIR /cakephp

RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.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/8.4/fpm/php-fpm.conf ; fi;

RUN composer install --optimize-autoloader --classmap-authoritative --no-dev
RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet

RUN chmod -R 777 /cakephp

CMD service php8.3-fpm start && \
CMD service php8.4-fpm start && \
nginx -c /cakephp/deploy/nginx.conf

0 comments on commit cff8102

Please sign in to comment.