From 495a2fe910ae00e72faef535c2c65c2e1ae204e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Wed, 27 Sep 2023 21:26:17 +0200 Subject: [PATCH] update ubuntu to 22.04 and php to 8.1 --- docker/Dockerfile | 10 +++++----- docker/configs/nginx.conf | 2 +- docker/scripts/entry-point-dev.sh | 4 ++-- docker/scripts/entry-point.sh | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f511e28..6f6e259 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:focal AS rvr_base +FROM ubuntu:22.04 AS rvr_base ENV DEBIAN_FRONTEND noninteractive RUN apt update --fix-missing && apt install -y sudo curl git unzip mariadb-client nginx \ - php-apcu php7.4-cli php7.4-curl php7.4-fpm php7.4-mbstring php7.4-mysql php7.4-zip php7.4-xml + php-apcu php8.1-cli php8.1-curl php8.1-fpm php8.1-mbstring php8.1-mysql php8.1-zip php8.1-xml RUN mkdir -p /run/php COPY docker/configs/nginx.conf /etc/nginx/sites-available/default @@ -20,9 +20,9 @@ FROM rvr_base AS rvr_dev RUN apt update --fix-missing && apt install -y php-xdebug -RUN echo "xdebug.remote_enable = 1" >> /etc/php/7.4/mods-available/xdebug.ini &&\ - echo "xdebug.remote_autostart = 1" >> /etc/php/7.4/mods-available/xdebug.ini &&\ - echo "xdebug.remote_connect_back = 1" >> /etc/php/7.4/mods-available/xdebug.ini +RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.1/mods-available/xdebug.ini &&\ + echo "xdebug.remote_autostart = 1" >> /etc/php/8.1/mods-available/xdebug.ini &&\ + echo "xdebug.remote_connect_back = 1" >> /etc/php/8.1/mods-available/xdebug.ini EXPOSE 80 EXPOSE 5000 diff --git a/docker/configs/nginx.conf b/docker/configs/nginx.conf index ce834ed..b9fd29f 100644 --- a/docker/configs/nginx.conf +++ b/docker/configs/nginx.conf @@ -14,7 +14,7 @@ server { location ~ \.php$ { include snippets/fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; } location ~ /\.ht { diff --git a/docker/scripts/entry-point-dev.sh b/docker/scripts/entry-point-dev.sh index 0d5fe81..2b1d6a5 100755 --- a/docker/scripts/entry-point-dev.sh +++ b/docker/scripts/entry-point-dev.sh @@ -20,11 +20,11 @@ USER_UID=$(stat -c "%u" .env) USER_GID=$(stat -c "%g" .env) groupadd --gid $USER_GID rvr useradd --uid $USER_UID --gid $USER_GID rvr -sed -i -e "s/^user = .*$/user = rvr/g" -e "s/^group = .*$/group = rvr/g" /etc/php/7.4/fpm/pool.d/www.conf +sed -i -e "s/^user = .*$/user = rvr/g" -e "s/^group = .*$/group = rvr/g" /etc/php/8.1/fpm/pool.d/www.conf set +e -/usr/sbin/php-fpm7.4 -F & +/usr/sbin/php-fpm8.1 -F & /usr/sbin/nginx -g 'daemon off;' & wait -n diff --git a/docker/scripts/entry-point.sh b/docker/scripts/entry-point.sh index f9dfa54..62ef125 100755 --- a/docker/scripts/entry-point.sh +++ b/docker/scripts/entry-point.sh @@ -14,12 +14,12 @@ USER_GID=$(stat -c "%g" .env) groupadd --gid $USER_GID rvr useradd --uid $USER_UID --gid $USER_GID rvr chown -R rvr:rvr cache -sed -i -e "s/^user = .*$/user = rvr/g" -e "s/^group = .*$/group = rvr/g" /etc/php/7.4/fpm/pool.d/www.conf +sed -i -e "s/^user = .*$/user = rvr/g" -e "s/^group = .*$/group = rvr/g" /etc/php/8.1/fpm/pool.d/www.conf set +e /usr/sbin/cron -f & -/usr/sbin/php-fpm7.4 -F & +/usr/sbin/php-fpm8.1 -F & /usr/sbin/nginx -g 'daemon off;' & wait -n