Skip to content

Commit 8f3920f

Browse files
committed
Upgrade to PHP8.0
1 parent f67cc57 commit 8f3920f

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
FROM alpine:3.13
22
LABEL Maintainer="Tim de Pater <code@trafex.nl>" \
3-
Description="Lightweight container with Nginx 1.18 & PHP 7.4 based on Alpine Linux."
3+
Description="Lightweight container with Nginx 1.18 & PHP 8.0 based on Alpine Linux."
44

55
# Install packages and remove default server definition
6-
RUN apk --no-cache add php7 php7-fpm php7-opcache php7-mysqli php7-json php7-openssl php7-curl \
7-
php7-zlib php7-xml php7-phar php7-intl php7-dom php7-xmlreader php7-ctype php7-session \
8-
php7-mbstring php7-gd nginx supervisor curl && \
6+
RUN apk --no-cache add php8 php8-fpm php8-opcache php8-mysqli php8-json php8-openssl php8-curl \
7+
php8-zlib php8-xml php8-phar php8-intl php8-dom php8-xmlreader php8-ctype php8-session \
8+
php8-mbstring php8-gd nginx supervisor curl && \
99
rm /etc/nginx/conf.d/default.conf
1010

1111
# Configure nginx
1212
COPY config/nginx.conf /etc/nginx/nginx.conf
1313

1414
# Configure PHP-FPM
15-
COPY config/fpm-pool.conf /etc/php7/php-fpm.d/www.conf
16-
COPY config/php.ini /etc/php7/conf.d/custom.ini
15+
COPY config/fpm-pool.conf /etc/php8/php-fpm.d/www.conf
16+
COPY config/php.ini /etc/php8/conf.d/custom.ini
1717

1818
# Configure supervisord
1919
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Docker PHP-FPM 7.4 & Nginx 1.18 on Alpine Linux
2-
Example PHP-FPM 7.4 & Nginx 1.18 setup for Docker, build on [Alpine Linux](https://www.alpinelinux.org/).
1+
# Docker PHP-FPM 8.0 & Nginx 1.18 on Alpine Linux
2+
Example PHP-FPM 8.0 & Nginx 1.18 setup for Docker, build on [Alpine Linux](https://www.alpinelinux.org/).
33
The image is only +/- 35MB large.
44

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

77

88
* Built on the lightweight and secure Alpine Linux distribution
99
* Very small Docker image size (+/-35MB)
10-
* Uses PHP 7.4 for better performance, lower CPU usage & memory footprint
10+
* Uses PHP 8.0 for better performance, lower 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 PM)
1313
* The servers Nginx, PHP-FPM and supervisord run under a non-privileged user (nobody) to make it more secure
@@ -18,7 +18,7 @@ Repository: https://github.com/TrafeX/docker-php-nginx
1818
[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/alpine-nginx-php7.svg)](https://hub.docker.com/r/trafex/alpine-nginx-php7/)
1919
[![Docker image layers](https://images.microbadger.com/badges/image/trafex/alpine-nginx-php7.svg)](https://microbadger.com/images/trafex/alpine-nginx-php7)
2020
![nginx 1.18.0](https://img.shields.io/badge/nginx-1.18-brightgreen.svg)
21-
![php 7.4](https://img.shields.io/badge/php-7.4-brightgreen.svg)
21+
![php 8.0](https://img.shields.io/badge/php-8.0-brightgreen.svg)
2222
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)
2323

2424
### Breaking changes (26/01/2019)

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-fpm7 -F
8+
command=php-fpm8 -F
99
stdout_logfile=/dev/stdout
1010
stdout_logfile_maxbytes=0
1111
stderr_logfile=/dev/stderr

docker-compose.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
app:
44
build: .
55
sut:
6-
image: alpine:3.12
6+
image: alpine:3.13
77
depends_on:
88
- app
99
command: /tmp/run_tests.sh

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 7.4'
3+
curl --silent --fail http://app:8080 | grep 'PHP 8.0'

0 commit comments

Comments
 (0)