Skip to content

Commit caccfb2

Browse files
committed
Upgrade to PHP8 and nginx 1.20
1 parent 87da92f commit caccfb2

File tree

3 files changed

+37
-34
lines changed

3 files changed

+37
-34
lines changed

Dockerfile

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,49 @@
1-
FROM alpine:3.13
1+
FROM alpine:3.14
22
LABEL Maintainer="Tim de Pater <[email protected]>" \
3-
Description="Lightweight WordPress container with Nginx 1.18 & PHP-FPM 7.4 based on Alpine Linux."
3+
Description="Lightweight WordPress container with Nginx 1.20 & PHP-FPM 8.0 based on Alpine Linux."
44

55
# Install packages
66
RUN apk --no-cache add \
7-
php7 \
8-
php7-fpm \
9-
php7-mysqli \
10-
php7-json \
11-
php7-openssl \
12-
php7-curl \
13-
php7-zlib \
14-
php7-xml \
15-
php7-phar \
16-
php7-intl \
17-
php7-dom \
18-
php7-xmlreader \
19-
php7-xmlwriter \
20-
php7-exif \
21-
php7-fileinfo \
22-
php7-sodium \
23-
php7-openssl \
24-
php7-gd \
25-
php7-imagick \
26-
php7-simplexml \
27-
php7-ctype \
28-
php7-mbstring \
29-
php7-zip \
30-
php7-opcache \
7+
php8 \
8+
php8-fpm \
9+
php8-mysqli \
10+
php8-json \
11+
php8-openssl \
12+
php8-curl \
13+
php8-zlib \
14+
php8-xml \
15+
php8-phar \
16+
php8-intl \
17+
php8-dom \
18+
php8-xmlreader \
19+
php8-xmlwriter \
20+
php8-exif \
21+
php8-fileinfo \
22+
php8-sodium \
23+
php8-openssl \
24+
php8-gd \
25+
php8-simplexml \
26+
php8-ctype \
27+
php8-mbstring \
28+
php8-zip \
29+
php8-opcache \
30+
php8-iconv \
31+
php8-pecl-imagick \
3132
nginx \
3233
supervisor \
3334
curl \
3435
bash \
3536
less
3637

38+
# Create symlink so programs depending on `php` still function
39+
RUN ln -s /usr/bin/php8 /usr/bin/php
40+
3741
# Configure nginx
3842
COPY config/nginx.conf /etc/nginx/nginx.conf
3943

4044
# Configure PHP-FPM
41-
COPY config/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf
42-
COPY config/php.ini /etc/php7/conf.d/zzz_custom.ini
45+
COPY config/fpm-pool.conf /etc/php8/php-fpm.d/zzz_custom.conf
46+
COPY config/php.ini /etc/php8/conf.d/zzz_custom.ini
4347

4448
# Configure supervisord
4549
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

README.md

Lines changed: 4 additions & 5 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.18 & PHP-FPM 7.4 based on Alpine Linux.
4+
Lightweight WordPress container with Nginx 1.20 & PHP-FPM 8.0 based on Alpine Linux.
55

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

@@ -11,14 +11,13 @@ _WordPress version currently installed:_ **5.7.2**
1111
* Best to be used with Amazon Cloudfront as SSL terminator and CDN
1212
* Built on the lightweight Alpine Linux distribution
1313
* Small Docker image size (+/-50MB)
14-
* Uses PHP 7.4 for better performance, lower cpu usage & memory footprint
14+
* Uses PHP 8.0 for better performance, lower cpu usage & memory footprint
1515
* Can safely be updated without losing data
1616
* Fully configurable because wp-config.php uses the environment variables you can pass as an argument to the container
1717

1818
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/wordpress.svg)](https://hub.docker.com/r/trafex/wordpress/)
19-
[![Docker image layers](https://images.microbadger.com/badges/image/trafex/wordpress.svg)](https://microbadger.com/images/trafex/wordpress)
20-
![nginx 1.18](https://img.shields.io/badge/nginx-1.18-brightgreen.svg)
21-
![php 7.4](https://img.shields.io/badge/php-7.4-brightgreen.svg)
19+
![nginx 1.20](https://img.shields.io/badge/nginx-1.20-brightgreen.svg)
20+
![php 8.0](https://img.shields.io/badge/php-8.0-brightgreen.svg)
2221
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)
2322

2423

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-fpm7 -F
7+
command=php-fpm8 -F
88
stdout_logfile=/dev/stdout
99
stdout_logfile_maxbytes=0
1010
redirect_stderr=true

0 commit comments

Comments
 (0)