Skip to content

Commit 1545dc1

Browse files
committed
Upgrade to Alpine Linux 3.19 and PHP 8.3
1 parent b829e43 commit 1545dc1

File tree

5 files changed

+31
-31
lines changed

5 files changed

+31
-31
lines changed

Dockerfile

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
ARG ALPINE_VERSION=3.18
1+
ARG ALPINE_VERSION=3.19
22
FROM alpine:${ALPINE_VERSION}
33
LABEL Maintainer="Tim de Pater <[email protected]>"
4-
LABEL Description="Lightweight container with Nginx 1.24 & PHP 8.2 based on Alpine Linux."
4+
LABEL Description="Lightweight container with Nginx 1.24 & PHP 8.3 based on Alpine Linux."
55
# Setup document root
66
WORKDIR /var/www/html
77

88
# Install packages and remove default server definition
99
RUN apk add --no-cache \
1010
curl \
1111
nginx \
12-
php82 \
13-
php82-ctype \
14-
php82-curl \
15-
php82-dom \
16-
php82-fileinfo \
17-
php82-fpm \
18-
php82-gd \
19-
php82-intl \
20-
php82-mbstring \
21-
php82-mysqli \
22-
php82-opcache \
23-
php82-openssl \
24-
php82-phar \
25-
php82-session \
26-
php82-tokenizer \
27-
php82-xml \
28-
php82-xmlreader \
29-
php82-xmlwriter \
12+
php83 \
13+
php83-ctype \
14+
php83-curl \
15+
php83-dom \
16+
php83-fileinfo \
17+
php83-fpm \
18+
php83-gd \
19+
php83-intl \
20+
php83-mbstring \
21+
php83-mysqli \
22+
php83-opcache \
23+
php83-openssl \
24+
php83-phar \
25+
php83-session \
26+
php83-tokenizer \
27+
php83-xml \
28+
php83-xmlreader \
29+
php83-xmlwriter \
3030
supervisor
3131

3232
# Configure nginx - http
@@ -35,7 +35,7 @@ COPY config/nginx.conf /etc/nginx/nginx.conf
3535
COPY config/conf.d /etc/nginx/conf.d/
3636

3737
# Configure PHP-FPM
38-
ENV PHP_INI_DIR /etc/php82
38+
ENV PHP_INI_DIR /etc/php83
3939
COPY config/fpm-pool.conf ${PHP_INI_DIR}/php-fpm.d/www.conf
4040
COPY config/php.ini ${PHP_INI_DIR}/conf.d/custom.ini
4141

@@ -46,7 +46,7 @@ COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
4646
RUN chown -R nobody.nobody /var/www/html /run /var/lib/nginx /var/log/nginx
4747

4848
# Create symlink for php
49-
RUN ln -s /usr/bin/php82 /usr/bin/php
49+
RUN ln -s /usr/bin/php83 /usr/bin/php
5050

5151
# Switch to use a non-root user from here on
5252
USER nobody

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Docker PHP-FPM 8.2 & Nginx 1.24 on Alpine Linux
2-
Example PHP-FPM 8.2 & Nginx 1.24 container image for Docker, built on [Alpine Linux](https://www.alpinelinux.org/).
1+
# Docker PHP-FPM 8.3 & Nginx 1.24 on Alpine Linux
2+
Example PHP-FPM 8.3 & Nginx 1.24 container image for Docker, built on [Alpine Linux](https://www.alpinelinux.org/).
33

44
Repository: https://github.com/TrafeX/docker-php-nginx
55

66

77
* Built on the lightweight and secure Alpine Linux distribution
88
* Multi-platform, supporting AMD4, ARMv6, ARMv7, ARM64
99
* Very small Docker image size (+/-40MB)
10-
* Uses PHP 8.2 for the best performance, low CPU usage & memory footprint
10+
* Uses PHP 8.3 for the best performance, low CPU usage & memory footprint
1111
* Optimized for 100 concurrent users
1212
* Optimized to only use resources when there's traffic (by using PHP-FPM's `on-demand` process manager)
1313
* The services Nginx, PHP-FPM and supervisord run under a non-privileged user (nobody) to make it more secure
@@ -16,7 +16,7 @@ Repository: https://github.com/TrafeX/docker-php-nginx
1616

1717
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/php-nginx.svg)](https://hub.docker.com/r/trafex/php-nginx/)
1818
![nginx 1.24](https://img.shields.io/badge/nginx-1.24-brightgreen.svg)
19-
![php 8.2](https://img.shields.io/badge/php-8.2-brightgreen.svg)
19+
![php 8.3](https://img.shields.io/badge/php-8.3-brightgreen.svg)
2020
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)
2121

2222
## [![Trafex Consultancy](https://timdepater.com/logo/mini-logo.png)](https://timdepater.com?mtm_campaign=github)
@@ -49,11 +49,11 @@ Nginx configuration:
4949

5050
PHP configuration:
5151

52-
docker run -v "`pwd`/php-setting.ini:/etc/php82/conf.d/settings.ini" trafex/php-nginx
52+
docker run -v "`pwd`/php-setting.ini:/etc/php83/conf.d/settings.ini" trafex/php-nginx
5353

5454
PHP-FPM configuration:
5555

56-
docker run -v "`pwd`/php-fpm-settings.conf:/etc/php82/php-fpm.d/server.conf" trafex/php-nginx
56+
docker run -v "`pwd`/php-fpm-settings.conf:/etc/php83/php-fpm.d/server.conf" trafex/php-nginx
5757

5858
_Note; Because `-v` requires an absolute path I've added `pwd` in the example to return the absolute path to the current directory_
5959

config/supervisord.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ logfile_maxbytes=0
55
pidfile=/run/supervisord.pid
66

77
[program:php-fpm]
8-
command=php-fpm82 -F
8+
command=php-fpm83 -F
99
stdout_logfile=/dev/stdout
1010
stdout_logfile_maxbytes=0
1111
stderr_logfile=/dev/stderr

docs/xdebug-support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ FROM trafex/php-nginx:latest
2727
USER root
2828

2929
# Install xdebug
30-
RUN apk add --no-cache php82-pecl-xdebug
30+
RUN apk add --no-cache php83-pecl-xdebug
3131

3232
# Add configuration
3333
COPY xdebug.ini ${PHP_INI_DIR}/conf.d/xdebug.ini

run_tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env sh
22
apk --no-cache add curl
3-
curl --silent --fail http://app:8080 | grep 'PHP 8.2'
3+
curl --silent --fail http://app:8080 | grep 'PHP 8.3'

0 commit comments

Comments
 (0)