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
RUN pacman --noconfirm -Syu \
autoconf \
bc \
binutils \
bwm-ng \
@@ -35,9 +36,9 @@ RUN pacman --noconfirm -Syu \
nginx \
nmon \
p7zip \
php7-fpm \
php7-gd \
php7-intl \
php-fpm \
php-gd \
php-intl \
powerline-fonts \
sudo \
supervisor \
@@ -49,24 +50,23 @@ RUN pacman --noconfirm -Syu \
wget \
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 && \
php /tmp/go-pear.phar && \
rm /tmp/go-pear.phar
RUN mkdir -p /var/log/php7 && \
ln -sf /dev/stderr /var/log/php7/php-fpm.error.log && \
ln -sf /dev/stdout /var/log/php7/php-fpm.access.log
RUN mkdir -p /var/log/php && \
ln -sf /dev/stderr /var/log/php/php-fpm.error.log && \
ln -sf /dev/stdout /var/log/php/php-fpm.access.log
RUN sed -i \
-e "s/user = http/user = nntmux/" \
-e "s/group = http/group = nntmux/" \
-e "s#;access.log = log/\$pool.access.log#access.log = /var/log/php7/php-fpm.access.log#" \
/etc/php7/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
-e "s#;access.log = log/\$pool.access.log#access.log = /var/log/php/php-fpm.access.log#" \
/etc/php/php-fpm.d/www.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 && \
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
RUN yay --noconfirm -Sy \
php7-imagick \
php7-memcached \
php7-sodium \
tcptrack
php-imagick \
php-memcached \
php-sodium
# \ tcptrack
RUN curl -Lo- http://bit.ly/2pztvLf | bash
# We disable it here because we enable it in the overrides file which affects
# both php7-fpm as well as cli
RUN sudo sed -i 's/^extension=curl/;extension=curl/' /etc/php7/php.ini
# both php-fpm as well as cli
RUN sudo sed -i \
-e 's/^extension=curl/;extension=curl/' \
-e 's/^extension=zip/;extension=zip/' \
/etc/php/php.ini
WORKDIR /site
+2 -2
View File
@@ -13,8 +13,8 @@ services:
- ./docker/nginx.conf:/etc/nginx/nginx.conf
- ./docker/supervisor.d:/etc/supervisor.d
- ./docker/composer-auth.json:/home/nntmux/.composer/auth.json
- ./docker/php-overrides.ini:/etc/php7/conf.d/overrides.ini
- ./docker/php-overrides.local.ini:/etc/php7/conf.d/overrides.local.ini
- ./docker/php-overrides.ini:/etc/php/conf.d/overrides.ini
- ./docker/php-overrides.local.ini:/etc/php/conf.d/overrides.local.ini
env_file: .env
ports:
- 80
+1 -1
View File
@@ -77,7 +77,7 @@ http {
fastcgi_param SERVER_NAME $http_host;
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)(/.+)$;
try_files $uri =404;
+1
View File
@@ -15,6 +15,7 @@ extension=intl
extension=pdo_mysql
extension=sockets
extension=sodium.so
extension=zip.so
; Add the following to php-overrides.local.ini.
; That file is gitignored so you can add any customizations there.
+1 -1
View File
@@ -1,5 +1,5 @@
[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
autorestart=true
priority=5