Skip to content

Commit

Permalink
update to noble and php 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pagdot committed Sep 16, 2024
1 parent e435660 commit 0f08254
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
32 changes: 16 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble

RUN \
echo "**** Add nginx repository ****" && \
curl https://nginx.org/keys/nginx_signing.key > /etc/apt/trusted.gpg.d/nginx.asc && \
echo "deb http://nginx.org/packages/ubuntu jammy nginx" > /etc/apt/sources.list.d/nginx.list && \
echo "deb http://nginx.org/packages/ubuntu noble nginx" > /etc/apt/sources.list.d/nginx.list && \
echo "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" > /etc/apt/preferences.d/99nginx && \
apt update && \
echo "**** install build packages ****" && \
Expand All @@ -16,13 +16,13 @@ RUN \
nano \
nginx \
openssl \
php8.1 \
php8.1-fileinfo \
php8.1-fpm \
php8.1-mbstring \
php8.1-simplexml \
php8.1-xml \
php8.1-xmlwriter && \
php8.3 \
php8.3-fileinfo \
php8.3-fpm \
php8.3-mbstring \
php8.3-simplexml \
php8.3-xml \
php8.3-xmlwriter && \
echo "**** configure nginx ****" && \
echo 'fastcgi_param HTTP_PROXY ""; # https://httpoxy.org/' >> \
/etc/nginx/fastcgi_params && \
Expand All @@ -35,18 +35,18 @@ RUN \
rm -f /etc/nginx/http.d/default.conf && \
rm -f /etc/nginx/conf.d/* && \
echo "**** configure php ****" && \
sed -i "s#error_log = /var/log/php8.1-fpm.log.*#error_log = /config/log/php/error.log#g" \
/etc/php/8.1/fpm/php-fpm.conf && \
sed -i "s#error_log = /var/log/php8.3-fpm.log.*#error_log = /config/log/php/error.log#g" \
/etc/php/8.3/fpm/php-fpm.conf && \
sed -i "s#user = www-data.*#user = abc#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
sed -i "s#group = www-data.*#group = abc#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
sed -i "s#listen.owner = www-data.*#user = abc#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
sed -i "s#listen.group = www-data.*#group = abc#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
sed -i "s#listen = .*#listen = 127.0.0.1:9000#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
echo "**** fix logrotate ****" && \
sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \
/etc/cron.daily/logrotate && \
Expand Down
32 changes: 16 additions & 16 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble

RUN \
echo "**** Add nginx repository ****" && \
curl https://nginx.org/keys/nginx_signing.key > /etc/apt/trusted.gpg.d/nginx.asc && \
echo "deb http://nginx.org/packages/ubuntu jammy nginx" > /etc/apt/sources.list.d/nginx.list && \
echo "deb http://nginx.org/packages/ubuntu noble nginx" > /etc/apt/sources.list.d/nginx.list && \
echo "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" > /etc/apt/preferences.d/99nginx && \
apt update && \
echo "**** install build packages ****" && \
Expand All @@ -16,13 +16,13 @@ RUN \
nano \
nginx \
openssl \
php8.1 \
php8.1-fileinfo \
php8.1-fpm \
php8.1-mbstring \
php8.1-simplexml \
php8.1-xml \
php8.1-xmlwriter && \
php8.3 \
php8.3-fileinfo \
php8.3-fpm \
php8.3-mbstring \
php8.3-simplexml \
php8.3-xml \
php8.3-xmlwriter && \
echo "**** configure nginx ****" && \
echo 'fastcgi_param HTTP_PROXY ""; # https://httpoxy.org/' >> \
/etc/nginx/fastcgi_params && \
Expand All @@ -35,18 +35,18 @@ RUN \
rm -f /etc/nginx/http.d/default.conf && \
rm -f /etc/nginx/conf.d/* && \
echo "**** configure php ****" && \
sed -i "s#error_log = /var/log/php8.1-fpm.log.*#error_log = /config/log/php/error.log#g" \
/etc/php/8.1/fpm/php-fpm.conf && \
sed -i "s#error_log = /var/log/php8.3-fpm.log.*#error_log = /config/log/php/error.log#g" \
/etc/php/8.3/fpm/php-fpm.conf && \
sed -i "s#user = www-data.*#user = abc#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
sed -i "s#group = www-data.*#group = abc#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
sed -i "s#listen.owner = www-data.*#user = abc#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
sed -i "s#listen.group = www-data.*#group = abc#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
sed -i "s#listen = .*#listen = 127.0.0.1:9000#g" \
/etc/php/8.1/fpm/pool.d/www.conf && \
/etc/php/8.3/fpm/pool.d/www.conf && \
echo "**** fix logrotate ****" && \
sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \
/etc/cron.daily/logrotate && \
Expand Down
4 changes: 2 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/init-php/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ if [[ ! -f /config/php/php-local.ini ]]; then
fi

# copy user php-local.ini to image
cp /config/php/php-local.ini /etc/php/8.1/fpm/conf.d/php-local.ini
cp /config/php/php-local.ini /etc/php/8.3/fpm/conf.d/php-local.ini

# create override for www.conf if it doesn't exist
if [[ ! -f /config/php/www2.conf ]]; then
printf "; Edit this file to override www.conf and php-fpm.conf directives and restart the container\\n\\n; Pool name\\n[www]\\n\\n" >/config/php/www2.conf
fi

# copy user www2.conf to image
cp /config/php/www2.conf /etc/php/8.1/fpm/conf.d/www2.conf
cp /config/php/www2.conf /etc/php/8.3/fpm/conf.d/www2.conf
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-php-fpm/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

exec /usr/sbin/php-fpm8.1 -F
exec /usr/sbin/php-fpm8.3 -F

0 comments on commit 0f08254

Please sign in to comment.