Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 397b58a

Browse files
committed
Upgrade PHP to 8.2
1 parent 8780e1b commit 397b58a

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

‎Dockerfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
ARG ALPINE_VERSION=3.18
22
FROM alpine:${ALPINE_VERSION}
33
LABEL Maintainer="Tim de Pater <code@trafex.nl>"
4-
LABEL Description="Lightweight container with Nginx 1.24 & PHP 8.1 based on Alpine Linux."
4+
LABEL Description="Lightweight container with Nginx 1.24 & PHP 8.2 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-
php81 \
13-
php81-ctype \
14-
php81-curl \
15-
php81-dom \
16-
php81-fpm \
17-
php81-gd \
18-
php81-intl \
19-
php81-mbstring \
20-
php81-mysqli \
21-
php81-opcache \
22-
php81-openssl \
23-
php81-phar \
24-
php81-session \
25-
php81-xml \
26-
php81-xmlreader \
12+
php82 \
13+
php82-ctype \
14+
php82-curl \
15+
php82-dom \
16+
php82-fpm \
17+
php82-gd \
18+
php82-intl \
19+
php82-mbstring \
20+
php82-mysqli \
21+
php82-opcache \
22+
php82-openssl \
23+
php82-phar \
24+
php82-session \
25+
php82-xml \
26+
php82-xmlreader \
2727
supervisor
2828

2929
# Configure nginx - http
@@ -32,8 +32,8 @@ COPY config/nginx.conf /etc/nginx/nginx.conf
3232
COPY config/conf.d /etc/nginx/conf.d/
3333

3434
# Configure PHP-FPM
35-
COPY config/fpm-pool.conf /etc/php81/php-fpm.d/www.conf
36-
COPY config/php.ini /etc/php81/conf.d/custom.ini
35+
COPY config/fpm-pool.conf /etc/php82/php-fpm.d/www.conf
36+
COPY config/php.ini /etc/php82/conf.d/custom.ini
3737

3838
# Configure supervisord
3939
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

‎README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# Docker PHP-FPM 8.1 & Nginx 1.24 on Alpine Linux
2-
Example PHP-FPM 8.1 & Nginx 1.24 container image for Docker, built on [Alpine Linux](https://www.alpinelinux.org/).
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/).
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.1 for better performance, lower CPU usage & memory footprint
10+
* Uses PHP 8.2 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
1414
* The logs of all the services are redirected to the output of the Docker container (visible with `docker logs -f <container name>`)
1515
* Follows the KISS principle (Keep It Simple, Stupid) to make it easy to understand and adjust the image to your needs
1616

1717
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/php-nginx.svg)](https://hub.docker.com/r/trafex/php-nginx/)
18-
![nginx 1.22](https://img.shields.io/badge/nginx-1.22-brightgreen.svg)
19-
![php 8.1](https://img.shields.io/badge/php-8.1-brightgreen.svg)
18+
![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)
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)
@@ -55,7 +55,7 @@ Nginx configuration:
5555

5656
PHP configuration:
5757

58-
docker run -v "`pwd`/php-setting.ini:/etc/php81/conf.d/settings.ini" trafex/php-nginx
58+
docker run -v "`pwd`/php-setting.ini:/etc/php82/conf.d/settings.ini" trafex/php-nginx
5959

6060
PHP-FPM configuration:
6161

‎config/supervisord.conf

Lines changed: 1 addition & 1 deletion
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-fpm81 -F
8+
command=php-fpm82 -F
99
stdout_logfile=/dev/stdout
1010
stdout_logfile_maxbytes=0
1111
stderr_logfile=/dev/stderr

‎run_tests.sh

Lines changed: 1 addition & 1 deletion
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.1'
3+
curl --silent --fail http://app:8080 | grep 'PHP 8.2'

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /