Update docker to latest php, 8

This commit is contained in:
Beshoy Girgis
2023-02-05 17:11:27 -06:00
parent 9595189a1a
commit d731b7cd23
5 changed files with 27 additions and 23 deletions
+22 -19
View File
@@ -17,6 +17,7 @@ RUN chsh -s /bin/zsh root && \
curl -Lo- http://bit.ly/2pztvLf | bash curl -Lo- http://bit.ly/2pztvLf | bash
RUN pacman --noconfirm -Syu \ RUN pacman --noconfirm -Syu \
autoconf \
bc \ bc \
binutils \ binutils \
bwm-ng \ bwm-ng \
@@ -35,9 +36,9 @@ RUN pacman --noconfirm -Syu \
nginx \ nginx \
nmon \ nmon \
p7zip \ p7zip \
php7-fpm \ php-fpm \
php7-gd \ php-gd \
php7-intl \ php-intl \
powerline-fonts \ powerline-fonts \
sudo \ sudo \
supervisor \ supervisor \
@@ -49,24 +50,23 @@ RUN pacman --noconfirm -Syu \
wget \ wget \
which which
# Temporary, until nntmux is ready for php8
RUN mv /usr/sbin/php /usr/sbin/php8 && \
mv /usr/sbin/php7 /usr/sbin/php
RUN wget http://pear.php.net/go-pear.phar -O /tmp/go-pear.phar && \ RUN wget http://pear.php.net/go-pear.phar -O /tmp/go-pear.phar && \
php /tmp/go-pear.phar && \ php /tmp/go-pear.phar && \
rm /tmp/go-pear.phar rm /tmp/go-pear.phar
RUN mkdir -p /var/log/php7 && \ RUN mkdir -p /var/log/php && \
ln -sf /dev/stderr /var/log/php7/php-fpm.error.log && \ ln -sf /dev/stderr /var/log/php/php-fpm.error.log && \
ln -sf /dev/stdout /var/log/php7/php-fpm.access.log ln -sf /dev/stdout /var/log/php/php-fpm.access.log
RUN sed -i \ RUN sed -i \
-e "s/user = http/user = nntmux/" \ -e "s/user = http/user = nntmux/" \
-e "s/group = http/group = nntmux/" \ -e "s/group = http/group = nntmux/" \
-e "s#;access.log = log/\$pool.access.log#access.log = /var/log/php7/php-fpm.access.log#" \ -e "s#;access.log = log/\$pool.access.log#access.log = /var/log/php/php-fpm.access.log#" \
/etc/php7/php-fpm.d/www.conf && \ /etc/php/php-fpm.d/www.conf && \
sed -i "s#error_log = syslog#error_log = /var/log/php7/php-fpm.error.log#" /etc/php7/php-fpm.conf sed -i "s#error_log = syslog#error_log = /var/log/php/php-fpm.error.log#" /etc/php/php-fpm.conf
RUN pecl channel-update pecl.php.net && \
pecl install zip
RUN groupadd --gid 1000 nntmux && \ RUN groupadd --gid 1000 nntmux && \
useradd --create-home --system --shell /usr/sbin/zsh --uid 1000 --gid 1000 nntmux && \ useradd --create-home --system --shell /usr/sbin/zsh --uid 1000 --gid 1000 nntmux && \
@@ -86,16 +86,19 @@ RUN git clone --depth 1 https://aur.archlinux.org/yay.git /tmp/yay && \
rm -rf /tmp/yay rm -rf /tmp/yay
RUN yay --noconfirm -Sy \ RUN yay --noconfirm -Sy \
php7-imagick \ php-imagick \
php7-memcached \ php-memcached \
php7-sodium \ php-sodium
tcptrack # \ tcptrack
RUN curl -Lo- http://bit.ly/2pztvLf | bash RUN curl -Lo- http://bit.ly/2pztvLf | bash
# We disable it here because we enable it in the overrides file which affects # We disable it here because we enable it in the overrides file which affects
# both php7-fpm as well as cli # both php-fpm as well as cli
RUN sudo sed -i 's/^extension=curl/;extension=curl/' /etc/php7/php.ini RUN sudo sed -i \
-e 's/^extension=curl/;extension=curl/' \
-e 's/^extension=zip/;extension=zip/' \
/etc/php/php.ini
WORKDIR /site WORKDIR /site
+2 -2
View File
@@ -13,8 +13,8 @@ services:
- ./docker/nginx.conf:/etc/nginx/nginx.conf - ./docker/nginx.conf:/etc/nginx/nginx.conf
- ./docker/supervisor.d:/etc/supervisor.d - ./docker/supervisor.d:/etc/supervisor.d
- ./docker/composer-auth.json:/home/nntmux/.composer/auth.json - ./docker/composer-auth.json:/home/nntmux/.composer/auth.json
- ./docker/php-overrides.ini:/etc/php7/conf.d/overrides.ini - ./docker/php-overrides.ini:/etc/php/conf.d/overrides.ini
- ./docker/php-overrides.local.ini:/etc/php7/conf.d/overrides.local.ini - ./docker/php-overrides.local.ini:/etc/php/conf.d/overrides.local.ini
env_file: .env env_file: .env
ports: ports:
- 80 - 80
+1 -1
View File
@@ -77,7 +77,7 @@ http {
fastcgi_param SERVER_NAME $http_host; fastcgi_param SERVER_NAME $http_host;
fastcgi_param HTTPS on; fastcgi_param HTTPS on;
fastcgi_pass unix:/run/php-fpm7/php-fpm.sock; fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $uri =404; try_files $uri =404;
+1
View File
@@ -15,6 +15,7 @@ extension=intl
extension=pdo_mysql extension=pdo_mysql
extension=sockets extension=sockets
extension=sodium.so extension=sodium.so
extension=zip.so
; Add the following to php-overrides.local.ini. ; Add the following to php-overrides.local.ini.
; That file is gitignored so you can add any customizations there. ; That file is gitignored so you can add any customizations there.
+1 -1
View File
@@ -1,5 +1,5 @@
[program:php-fpm] [program:php-fpm]
command=/usr/sbin/php-fpm7 --nodaemonize -c /etc/php7/php-fpm.conf command=php-fpm --nodaemonize -c /etc/php/php-fpm.conf
autostart=true autostart=true
autorestart=true autorestart=true
priority=5 priority=5