Skip to content

Commit b5a9f12

Browse files
authored
Merge pull request #250 from rafalohaki/main
Update Version Alpine/PHP
2 parents e11a20c + e2eead1 commit b5a9f12

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax = edrevo/dockerfile-plus
2-
ARG VERSION="3.17"
2+
ARG VERSION="3.18"
33
FROM alpine:${VERSION} AS librex
44
WORKDIR "/var/www/html"
55

docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
sh "docker/php/prepare.sh"
66
sh "docker/server/prepare.sh"
77

8-
/bin/sh -c /usr/sbin/php-fpm7
8+
/bin/sh -c /usr/sbin/php-fpm8
99

1010
exec nginx -g "daemon off;"

docker/php/php.dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Set this argument during build time to indicate that the path is for php's www.conf
2-
ARG WWW_CONFIG="/etc/php7/php-fpm.d/www.conf"
2+
ARG WWW_CONFIG="/etc/php8/php-fpm.d/www.conf"
33

44
# Configure 'opensearch.xml' with Librex configuration metadata, such as the encoding and the host that stores the site
55
# These configurations will replace the 'opensearch.xml' inside '.dockers/templates' for the best setup for your instance
@@ -52,8 +52,8 @@ ENV CURLOPT_VERBOSE=true
5252

5353
# Install PHP-FPM using Alpine's package manager, apk
5454
# Configure PHP-FPM to listen on a Unix socket instead of a TCP port, which is more secure and efficient
55-
RUN apk add php7 php7-fpm php7-dom php7-curl php7-json --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing &&\
56-
sed -i 's/^\s*listen = 127.0.0.1:9000/listen = \/run\/php7\/php-fpm7.sock/' ${WWW_CONFIG} &&\
55+
RUN apk add php8 php8-fpm php8-dom php8-curl php8-json --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing &&\
56+
sed -i 's/^\s*listen = 127.0.0.1:9000/listen = \/run\/php8\/php-fpm8.sock/' ${WWW_CONFIG} &&\
5757
sed -i 's/^\s*;\s*listen.owner = nobody/listen.owner = nginx/' ${WWW_CONFIG} &&\
5858
sed -i 's/^\s*;\s*listen.group = nobody/listen.group = nginx/' ${WWW_CONFIG} &&\
5959
sed -i 's/^\s*;\s*listen.mode = 0660/listen.mode = 0660/' ${WWW_CONFIG}

docker/php/prepare.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ echo "[PREPARE] docker/server/prepare.sh'"
55
# Load all environment variables from 'attributes.sh' using the command 'source /path/attributes.sh'
66
source "docker/attributes.sh"
77

8-
# This condition creates the Unix socket if 'php-fpm7.sock' does not already exist.
8+
# This condition creates the Unix socket if 'php-fpm8.sock' does not already exist.
99
# This fixes an issue where Nginx starts but does not serve content
10-
if [ ! -d "/run/php7" ] || [ ! -S "/run/php7/php-fpm7.sock" ]; then
11-
mkdir "/run/php7"
12-
touch "/run/php7/php-fpm7.sock"
13-
chmod 660 "/run/php7/php-fpm7.sock"
14-
chown nginx:nginx "/run/php7/php-fpm7.sock"
10+
if [ ! -d "/run/php8" ] || [ ! -S "/run/php8/php-fpm8.sock" ]; then
11+
mkdir "/run/php8"
12+
touch "/run/php8/php-fpm8.sock"
13+
chmod 660 "/run/php8/php-fpm8.sock"
14+
chown nginx:nginx "/run/php8/php-fpm8.sock"
1515
fi
1616

1717
# The lines below will replace the environment variables in the templates with the corresponding variables listed above. To accomplish this, the GNU 'envsubst' package will be used

docker/server/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ server {
1010
}
1111

1212
location ~ \.php$ {
13-
fastcgi_pass unix:/run/php7/php-fpm7.sock;
13+
fastcgi_pass unix:/run/php8/php-fpm8.sock;
1414
fastcgi_index index.php;
1515
include fastcgi.conf;
1616
}

0 commit comments

Comments
 (0)