Skip to content

Commit 925066e

Browse files
committed
Upgrade to Alpine Linux 3.21 and PHP 8.4
1 parent fd232c2 commit 925066e

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

Dockerfile

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
FROM alpine:3.20
1+
FROM alpine:3.21
22
LABEL Maintainer="Tim de Pater <[email protected]>" \
3-
Description="Lightweight WordPress container with Nginx 1.26 & PHP-FPM 8.3 based on Alpine Linux."
3+
Description="Lightweight WordPress container with Nginx 1.26 & PHP-FPM 8.4 based on Alpine Linux."
44

55
# Install packages
66
RUN apk --no-cache add \
7-
php83 \
8-
php83-fpm \
9-
php83-mysqli \
10-
php83-json \
11-
php83-openssl \
12-
php83-curl \
13-
php83-zlib \
14-
php83-xml \
15-
php83-phar \
16-
php83-intl \
17-
php83-dom \
18-
php83-xmlreader \
19-
php83-xmlwriter \
20-
php83-exif \
21-
php83-fileinfo \
22-
php83-sodium \
23-
php83-gd \
24-
php83-simplexml \
25-
php83-ctype \
26-
php83-mbstring \
27-
php83-zip \
28-
php83-opcache \
29-
php83-iconv \
30-
php83-pecl-imagick \
31-
php83-session \
32-
php83-tokenizer \
7+
php84 \
8+
php84-fpm \
9+
php84-mysqli \
10+
php84-json \
11+
php84-openssl \
12+
php84-curl \
13+
php84-zlib \
14+
php84-xml \
15+
php84-phar \
16+
php84-intl \
17+
php84-dom \
18+
php84-xmlreader \
19+
php84-xmlwriter \
20+
php84-exif \
21+
php84-fileinfo \
22+
php84-sodium \
23+
php84-gd \
24+
php84-simplexml \
25+
php84-ctype \
26+
php84-mbstring \
27+
php84-zip \
28+
php84-opcache \
29+
php84-iconv \
30+
php84-pecl-imagick \
31+
php84-session \
32+
php84-tokenizer \
3333
nginx \
3434
supervisor \
3535
curl \
@@ -40,16 +40,16 @@ RUN apk --no-cache add \
4040
COPY config/nginx.conf /etc/nginx/nginx.conf
4141

4242
# Configure PHP-FPM
43-
COPY config/fpm-pool.conf /etc/php83/php-fpm.d/zzz_custom.conf
44-
COPY config/php.ini /etc/php83/conf.d/zzz_custom.ini
43+
COPY config/fpm-pool.conf /etc/php84/php-fpm.d/zzz_custom.conf
44+
COPY config/php.ini /etc/php84/conf.d/zzz_custom.ini
4545

4646
# Configure supervisord
4747
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
4848

4949
# wp-content volume
5050
VOLUME /var/www/wp-content
5151
WORKDIR /var/www/wp-content
52-
RUN chown -R nobody.nobody /var/www
52+
RUN chown -R nobody:nobody /var/www
5353

5454
# WordPress
5555
ENV WORDPRESS_VERSION 6.7.1
@@ -62,15 +62,15 @@ RUN curl -o wordpress.tar.gz -SL https://wordpress.org/wordpress-${WORDPRESS_VER
6262
&& echo "$WORDPRESS_SHA1 *wordpress.tar.gz" | sha1sum -c - \
6363
&& tar -xzf wordpress.tar.gz -C /usr/src/ \
6464
&& rm wordpress.tar.gz \
65-
&& chown -R nobody.nobody /usr/src/wordpress
65+
&& chown -R nobody:nobody /usr/src/wordpress
6666

6767
# Add WP CLI
6868
RUN curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
6969
&& chmod +x /usr/local/bin/wp
7070

7171
# WP config
72-
COPY wp-config.php /usr/src/wordpress
73-
RUN chown nobody.nobody /usr/src/wordpress/wp-config.php && chmod 640 /usr/src/wordpress/wp-config.php
72+
COPY --chown=nobody:nobody wp-config.php /usr/src/wordpress
73+
RUN chmod 640 /usr/src/wordpress/wp-config.php
7474

7575
# Link wp-secrets to location on wp-content
7676
RUN ln -s /var/www/wp-content/wp-secrets.php /usr/src/wordpress/wp-secrets.php

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# WordPress Docker Container
33

4-
Lightweight WordPress container with Nginx 1.26 & PHP-FPM 8.3 based on Alpine Linux.
4+
Lightweight WordPress container with Nginx 1.26 & PHP-FPM 8.4 based on Alpine Linux.
55

66
_WordPress version currently installed:_ **6.7.1**
77

@@ -12,13 +12,13 @@ _WordPress version currently installed:_ **6.7.1**
1212
* Multi-platform, supporting AMD4, ARMv6, ARMv7, ARM64
1313
* Built on the lightweight Alpine Linux distribution
1414
* Small Docker image size (+/-90MB)
15-
* Uses PHP 8.3 for the best performance, low cpu usage & memory footprint
15+
* Uses PHP 8.4 for the best performance, low cpu usage & memory footprint
1616
* Can safely be updated without losing data
1717
* Fully configurable because wp-config.php uses the environment variables you can pass as an argument to the container
1818

1919
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/wordpress.svg)](https://hub.docker.com/r/trafex/wordpress/)
2020
![nginx 1.26](https://img.shields.io/badge/nginx-1.26-brightgreen.svg)
21-
![php 8.3](https://img.shields.io/badge/php-8.3-brightgreen.svg)
21+
![php 8.4](https://img.shields.io/badge/php-8.4-brightgreen.svg)
2222
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)
2323

2424
## [![Trafex Consultancy](https://timdepater.com/logo/mini-logo.png)](https://timdepater.com?mtm_campaign=github)

config/supervisord.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ logfile=/var/log/supervisord.log
44
pidfile=/run/supervisord.pid
55

66
[program:php-fpm]
7-
command=php-fpm83 -F
7+
command=php-fpm84 -F
88
stdout_logfile=/dev/stdout
99
stdout_logfile_maxbytes=0
1010
redirect_stderr=true

0 commit comments

Comments
 (0)