Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ jobs:
tags: phpdockerio/php:8.3-fpm
tertiary: ~

- name: php84
folder: php/8.4
arch: [ linux/amd64, linux/arm64, linux/arm/v7 ]
targets:
primary:
name: cli
tags: phpdockerio/php:8.4-cli
secondary:
name: fpm
tags: phpdockerio/php:8.4-fpm
tertiary: ~

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -105,7 +117,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Primary container
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ${{ matrix.folder }}
platforms: ${{ join(matrix.arch, ',') }}
Expand All @@ -116,7 +128,7 @@ jobs:

- name: Secondary container
if: matrix.targets.secondary
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ${{ matrix.folder }}
platforms: ${{ join(matrix.arch, ',') }}
Expand All @@ -127,7 +139,7 @@ jobs:

- name: Tertiary container
if: matrix.targets.tertiary
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ${{ matrix.folder }}
platforms: ${{ join(matrix.arch, ',') }}
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ COPY --from=composer:1 /usr/bin/composer /usr/bin/composer

| PHP <br> version | Images | OS base | PHP EOL date | Daily builds |
|------------------|----------------------------------------------------------|---------------|---------------|--------------|
| 8.3 | `phpdockerio/php:8.3-cli` <br> `phpdockerio/php:8.3-fpm` | Ubuntu 22.04 | ✔ 23 Nov 2026 | ✔ |
| 8.2 | `phpdockerio/php:8.2-cli` <br> `phpdockerio/php:8.2-fpm` | Ubuntu 22.04 | ✔ 08 Dec 2025 | ✔ |
| 8.1 | `phpdockerio/php:8.1-cli` <br> `phpdockerio/php:8.1-fpm` | Ubuntu 22.04 | ✔ 25 Nov 2024 | ✔ |
| 8.4 | `phpdockerio/php:8.4-cli` <br> `phpdockerio/php:8.4-fpm` | Ubuntu 24.04 | ✔ 31 Nov 2028 | ✔ |
| 8.3 | `phpdockerio/php:8.3-cli` <br> `phpdockerio/php:8.3-fpm` | Ubuntu 22.04 | ✔ 31 Nov 2027 | ✔ |
| 8.2 | `phpdockerio/php:8.2-cli` <br> `phpdockerio/php:8.2-fpm` | Ubuntu 22.04 | ✔ 31 Dec 2026 | ✔ |
| 8.1 | `phpdockerio/php:8.1-cli` <br> `phpdockerio/php:8.1-fpm` | Ubuntu 22.04 | ✔ 31 Dec 2025 | ✔ |
| 8.0 | `phpdockerio/php:8.0-cli` <br> `phpdockerio/php:8.0-fpm` | Ubuntu 20.04 | ❌ 26 Nov 2023 | ✔ |
| 7.4 | `phpdockerio/php:7.4-cli` <br> `phpdockerio/php:7.4-fpm` | Ubuntu 20.04 | ❌ 28 Nov 2022 | ✔ |
| 7.3 | `phpdockerio/php73-cli` <br> `phpdockerio/php73-cli` | Ubuntu 18.04 | ❌ 06 Dec 2021 | ❌ |
Expand Down
59 changes: 59 additions & 0 deletions php/8.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
############################################
# PHPDocker.io PHP 8.4 / CLI and FPM image #
############################################

### CLI ###

FROM ubuntu:noble AS cli

# Fixes some weird terminal issues such as broken clear / CTRL+L
ENV TERM=linux

# Ensure apt doesn't ask questions when installing stuff
ENV DEBIAN_FRONTEND=noninteractive

# Install Ondrej repos for Ubuntu, PHP, composer and selected extensions - better selection than
# the distro's packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends gnupg \
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu noble main" > /etc/apt/sources.list.d/ondrej-php.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
ca-certificates \
curl \
unzip \
php8.4-apcu \
php8.4-cli \
php8.4-curl \
php8.4-mbstring \
php8.4-opcache \
php8.4-readline \
php8.4-xml \
php8.4-zip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* ~/.composer

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

CMD ["php", "-a"]

### FPM ###

FROM cli AS fpm

# Install FPM
RUN apt-get update \
&& apt-get -y --no-install-recommends install php8.4-fpm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

STOPSIGNAL SIGQUIT

# PHP-FPM packages need a nudge to make them docker-friendly
COPY overrides.conf /etc/php/8.4/fpm/pool.d/z-overrides.conf

CMD ["/usr/sbin/php-fpm8.4", "-O" ]

# Open up fcgi port
EXPOSE 9000
7 changes: 7 additions & 0 deletions php/8.4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PHPDocker.io - PHP 8.4 / CLI, FPM and Swoole container images

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/).

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

*Note on logging:* configure your application to stream logs into `php://stdout`. That's it.
27 changes: 27 additions & 0 deletions php/8.4/overrides.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[global]
; Override default pid file
pid = /run/php-fpm.pid

; Avoid logs being sent to syslog
error_log = /proc/self/fd/2

; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop
; This helps avoiding 502's
process_control_timeout = 30

; Do not daemonize (eg send process to the background)
daemonize = no

[www]
; Access from webserver container is via network, not socket file
listen = [::]:9000

; Redirect logs to stdout - FPM closes /dev/std* on startup
access.log = /proc/self/fd/2
catch_workers_output = yes

; Remove "pool www" decoration from log output
decorate_workers_output = no

; Required to allow config-by-environment
clear_env = no