update ubuntu to 22.04 and php to 8.1
This commit is contained in:
parent
dbb7c1c0fc
commit
64377be637
@ -1,9 +1,9 @@
|
|||||||
FROM ubuntu:focal AS mapg_base
|
FROM ubuntu:22.04 AS mapg_base
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
RUN apt update --fix-missing && apt install -y sudo curl git unzip mariadb-client nginx \
|
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
|
RUN mkdir -p /run/php
|
||||||
COPY docker/configs/nginx.conf /etc/nginx/sites-available/default
|
COPY docker/configs/nginx.conf /etc/nginx/sites-available/default
|
||||||
@ -20,9 +20,9 @@ FROM mapg_base AS mapg_dev
|
|||||||
|
|
||||||
RUN apt update --fix-missing && apt install -y php-xdebug
|
RUN apt update --fix-missing && apt install -y php-xdebug
|
||||||
|
|
||||||
RUN echo "xdebug.remote_enable = 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/7.4/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/7.4/mods-available/xdebug.ini
|
echo "xdebug.remote_connect_back = 1" >> /etc/php/8.1/mods-available/xdebug.ini
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
@ -23,11 +23,11 @@ USER_UID=$(stat -c "%u" .env)
|
|||||||
USER_GID=$(stat -c "%g" .env)
|
USER_GID=$(stat -c "%g" .env)
|
||||||
groupadd --gid $USER_GID mapg
|
groupadd --gid $USER_GID mapg
|
||||||
useradd --uid $USER_UID --gid $USER_GID mapg
|
useradd --uid $USER_UID --gid $USER_GID mapg
|
||||||
sed -i -e "s/^user = .*$/user = mapg/g" -e "s/^group = .*$/group = mapg/g" /etc/php/7.4/fpm/pool.d/www.conf
|
sed -i -e "s/^user = .*$/user = mapg/g" -e "s/^group = .*$/group = mapg/g" /etc/php/8.1/fpm/pool.d/www.conf
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
/usr/sbin/php-fpm7.4 -F &
|
/usr/sbin/php-fpm8.1 -F &
|
||||||
/usr/sbin/nginx -g 'daemon off;' &
|
/usr/sbin/nginx -g 'daemon off;' &
|
||||||
sudo -u mapg -g mapg /usr/bin/node --inspect=0.0.0.0:9229 multi &
|
sudo -u mapg -g mapg /usr/bin/node --inspect=0.0.0.0:9229 multi &
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@ USER_GID=$(stat -c "%g" .env)
|
|||||||
groupadd --gid $USER_GID mapg
|
groupadd --gid $USER_GID mapg
|
||||||
useradd --uid $USER_UID --gid $USER_GID mapg
|
useradd --uid $USER_UID --gid $USER_GID mapg
|
||||||
chown mapg:mapg cache
|
chown mapg:mapg cache
|
||||||
sed -i -e "s/^user = .*$/user = mapg/g" -e "s/^group = .*$/group = mapg/g" /etc/php/7.4/fpm/pool.d/www.conf
|
sed -i -e "s/^user = .*$/user = mapg/g" -e "s/^group = .*$/group = mapg/g" /etc/php/8.1/fpm/pool.d/www.conf
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
/usr/sbin/cron -f &
|
/usr/sbin/cron -f &
|
||||||
/usr/sbin/php-fpm7.4 -F &
|
/usr/sbin/php-fpm8.1 -F &
|
||||||
/usr/sbin/nginx -g 'daemon off;' &
|
/usr/sbin/nginx -g 'daemon off;' &
|
||||||
sudo -u mapg -g mapg /usr/bin/node multi &
|
sudo -u mapg -g mapg /usr/bin/node multi &
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user