Skip to content

Commit fe7b2e7

Browse files
authored
Merge pull request #70 from phpdocker-io/php84
PHP 8.4
2 parents 0ed34c3 + 32cf375 commit fe7b2e7

File tree

5 files changed

+112
-6
lines changed

5 files changed

+112
-6
lines changed

.github/workflows/docker-build.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ jobs:
8282
tags: phpdockerio/php:8.3-fpm
8383
tertiary: ~
8484

85+
- name: php84
86+
folder: php/8.4
87+
arch: [ linux/amd64, linux/arm64, linux/arm/v7 ]
88+
targets:
89+
primary:
90+
name: cli
91+
tags: phpdockerio/php:8.4-cli
92+
secondary:
93+
name: fpm
94+
tags: phpdockerio/php:8.4-fpm
95+
tertiary: ~
96+
8597
steps:
8698
- name: Checkout
8799
uses: actions/checkout@v4
@@ -105,7 +117,7 @@ jobs:
105117
password: ${{ secrets.DOCKERHUB_TOKEN }}
106118

107119
- name: Primary container
108-
uses: docker/build-push-action@v5
120+
uses: docker/build-push-action@v6
109121
with:
110122
context: ${{ matrix.folder }}
111123
platforms: ${{ join(matrix.arch, ',') }}
@@ -116,7 +128,7 @@ jobs:
116128

117129
- name: Secondary container
118130
if: matrix.targets.secondary
119-
uses: docker/build-push-action@v5
131+
uses: docker/build-push-action@v6
120132
with:
121133
context: ${{ matrix.folder }}
122134
platforms: ${{ join(matrix.arch, ',') }}
@@ -127,7 +139,7 @@ jobs:
127139

128140
- name: Tertiary container
129141
if: matrix.targets.tertiary
130-
uses: docker/build-push-action@v5
142+
uses: docker/build-push-action@v6
131143
with:
132144
context: ${{ matrix.folder }}
133145
platforms: ${{ join(matrix.arch, ',') }}

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ COPY --from=composer:1 /usr/bin/composer /usr/bin/composer
6565

6666
| PHP <br> version | Images | OS base | PHP EOL date | Daily builds |
6767
|------------------|----------------------------------------------------------|---------------|---------------|--------------|
68-
| 8.3 | `phpdockerio/php:8.3-cli` <br> `phpdockerio/php:8.3-fpm` | Ubuntu 22.04 | ✔ 23 Nov 2026 ||
69-
| 8.2 | `phpdockerio/php:8.2-cli` <br> `phpdockerio/php:8.2-fpm` | Ubuntu 22.04 | ✔ 08 Dec 2025 ||
70-
| 8.1 | `phpdockerio/php:8.1-cli` <br> `phpdockerio/php:8.1-fpm` | Ubuntu 22.04 | ✔ 25 Nov 2024 ||
68+
| 8.4 | `phpdockerio/php:8.4-cli` <br> `phpdockerio/php:8.4-fpm` | Ubuntu 24.04 | ✔ 31 Nov 2028 ||
69+
| 8.3 | `phpdockerio/php:8.3-cli` <br> `phpdockerio/php:8.3-fpm` | Ubuntu 22.04 | ✔ 31 Nov 2027 ||
70+
| 8.2 | `phpdockerio/php:8.2-cli` <br> `phpdockerio/php:8.2-fpm` | Ubuntu 22.04 | ✔ 31 Dec 2026 ||
71+
| 8.1 | `phpdockerio/php:8.1-cli` <br> `phpdockerio/php:8.1-fpm` | Ubuntu 22.04 | ✔ 31 Dec 2025 ||
7172
| 8.0 | `phpdockerio/php:8.0-cli` <br> `phpdockerio/php:8.0-fpm` | Ubuntu 20.04 | ❌ 26 Nov 2023 ||
7273
| 7.4 | `phpdockerio/php:7.4-cli` <br> `phpdockerio/php:7.4-fpm` | Ubuntu 20.04 | ❌ 28 Nov 2022 ||
7374
| 7.3 | `phpdockerio/php73-cli` <br> `phpdockerio/php73-cli` | Ubuntu 18.04 | ❌ 06 Dec 2021 ||

php/8.4/Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
############################################
2+
# PHPDocker.io PHP 8.4 / CLI and FPM image #
3+
############################################
4+
5+
### CLI ###
6+
7+
FROM ubuntu:noble AS cli
8+
9+
# Fixes some weird terminal issues such as broken clear / CTRL+L
10+
ENV TERM=linux
11+
12+
# Ensure apt doesn't ask questions when installing stuff
13+
ENV DEBIAN_FRONTEND=noninteractive
14+
15+
# Install Ondrej repos for Ubuntu, PHP, composer and selected extensions - better selection than
16+
# the distro's packages
17+
RUN apt-get update \
18+
&& apt-get install -y --no-install-recommends gnupg \
19+
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu noble main" > /etc/apt/sources.list.d/ondrej-php.list \
20+
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
21+
&& apt-get update \
22+
&& apt-get -y --no-install-recommends install \
23+
ca-certificates \
24+
curl \
25+
unzip \
26+
php8.4-apcu \
27+
php8.4-cli \
28+
php8.4-curl \
29+
php8.4-mbstring \
30+
php8.4-opcache \
31+
php8.4-readline \
32+
php8.4-xml \
33+
php8.4-zip \
34+
&& apt-get clean \
35+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* ~/.composer
36+
37+
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
38+
39+
CMD ["php", "-a"]
40+
41+
### FPM ###
42+
43+
FROM cli AS fpm
44+
45+
# Install FPM
46+
RUN apt-get update \
47+
&& apt-get -y --no-install-recommends install php8.4-fpm \
48+
&& apt-get clean \
49+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
50+
51+
STOPSIGNAL SIGQUIT
52+
53+
# PHP-FPM packages need a nudge to make them docker-friendly
54+
COPY overrides.conf /etc/php/8.4/fpm/pool.d/z-overrides.conf
55+
56+
CMD ["/usr/sbin/php-fpm8.4", "-O" ]
57+
58+
# Open up fcgi port
59+
EXPOSE 9000

php/8.4/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# PHPDocker.io - PHP 8.4 / CLI, FPM and Swoole container images
2+
3+
Ubuntu 22.04 PHP 8.4 CLI and FPM container images for [PHPDocker.io](http://phpdocker.io) projects. Packages are provided by [Ondřej Surý](https://deb.sury.org/).
4+
5+
Far smaller in size than PHP's official container. No need to compile any extensions: simply run `apt-get install php8.4-EXTENSION_NAME` as part of your Dockerfile
6+
7+
*Note on logging:* configure your application to stream logs into `php://stdout`. That's it.

php/8.4/overrides.conf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[global]
2+
; Override default pid file
3+
pid = /run/php-fpm.pid
4+
5+
; Avoid logs being sent to syslog
6+
error_log = /proc/self/fd/2
7+
8+
; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop
9+
; This helps avoiding 502's
10+
process_control_timeout = 30
11+
12+
; Do not daemonize (eg send process to the background)
13+
daemonize = no
14+
15+
[www]
16+
; Access from webserver container is via network, not socket file
17+
listen = [::]:9000
18+
19+
; Redirect logs to stdout - FPM closes /dev/std* on startup
20+
access.log = /proc/self/fd/2
21+
catch_workers_output = yes
22+
23+
; Remove "pool www" decoration from log output
24+
decorate_workers_output = no
25+
26+
; Required to allow config-by-environment
27+
clear_env = no

0 commit comments

Comments
 (0)