Skip to content

Commit 0ed34c3

Browse files
authored
Merge pull request #66 from phpdocker-io/php83
Add php 8.3
2 parents 21a4088 + 3780050 commit 0ed34c3

File tree

5 files changed

+111
-5
lines changed

5 files changed

+111
-5
lines changed

.github/workflows/docker-build.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
- name: php82
6262
folder: php/8.2
63-
arch: [linux/amd64, linux/arm64, linux/arm/v7]
63+
arch: [ linux/amd64, linux/arm64, linux/arm/v7 ]
6464
targets:
6565
primary:
6666
name: cli
@@ -70,12 +70,24 @@ jobs:
7070
tags: phpdockerio/php:8.2-fpm
7171
tertiary: ~
7272

73+
- name: php83
74+
folder: php/8.3
75+
arch: [ linux/amd64, linux/arm64, linux/arm/v7 ]
76+
targets:
77+
primary:
78+
name: cli
79+
tags: phpdockerio/php:8.3-cli
80+
secondary:
81+
name: fpm
82+
tags: phpdockerio/php:8.3-fpm
83+
tertiary: ~
84+
7385
steps:
7486
- name: Checkout
7587
uses: actions/checkout@v4
7688

7789
- name: Debug
78-
run: |
90+
run: |
7991
echo "is_master: -> ${{ github.ref == 'refs/heads/master' }} <-"
8092
echo "ref: ${{ github.head_ref }}"
8193

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 ||
6869
| 8.2 | `phpdockerio/php:8.2-cli` <br> `phpdockerio/php:8.2-fpm` | Ubuntu 22.04 | ✔ 08 Dec 2025 ||
6970
| 8.1 | `phpdockerio/php:8.1-cli` <br> `phpdockerio/php:8.1-fpm` | Ubuntu 22.04 | ✔ 25 Nov 2024 ||
70-
| 8.0 | `phpdockerio/php:8.0-cli` <br> `phpdockerio/php:8.0-fpm` | Ubuntu 20.04 | 26 Nov 2023 ||
71+
| 8.0 | `phpdockerio/php:8.0-cli` <br> `phpdockerio/php:8.0-fpm` | Ubuntu 20.04 | 26 Nov 2023 ||
7172
| 7.4 | `phpdockerio/php:7.4-cli` <br> `phpdockerio/php:7.4-fpm` | Ubuntu 20.04 | ❌ 28 Nov 2022 ||
7273
| 7.3 | `phpdockerio/php73-cli` <br> `phpdockerio/php73-cli` | Ubuntu 18.04 | ❌ 06 Dec 2021 ||
7374
| 7.2 | `phpdockerio/php72-cli` <br> `phpdockerio/php72-cli` | Ubuntu 18.04 | ❌ 30 Nov 2020 ||
@@ -77,9 +78,9 @@ COPY --from=composer:1 /usr/bin/composer /usr/bin/composer
7778

7879
* Versions past EOL (end of life) are unsupported, but may still get daily builds to ensure the underlying OS packages
7980
are up to date.
80-
* Daily builds are turned off for versions that run on an OS base that's also EOL (for instance, Debian Jessie).
81+
* Daily builds are turned off for versions that run on an OS base that's also EOL (for instance, Ubuntu 18.04).
8182
* Daily builds are kept for PHP versions that have reached EOL but the base OS has not - the base OS still receives
82-
security updates, including the PHP runtime.
83+
security updates.
8384
* In general, do not use any unsupported images in a production environment, regardless of whether daily builds are
8485
still enabled. I continue to build these for absolute holdouts that haven't been able to upgrade on time.
8586
* Old images are kept in docker hub in the interest of enabling legacy apps to run. Docker does delete images that

php/8.3/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.3 / CLI and FPM image #
3+
############################################
4+
5+
### CLI ###
6+
7+
FROM ubuntu:jammy 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 jammy, 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 jammy 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.3-apcu \
27+
php8.3-cli \
28+
php8.3-curl \
29+
php8.3-mbstring \
30+
php8.3-opcache \
31+
php8.3-readline \
32+
php8.3-xml \
33+
php8.3-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.3-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.3/fpm/pool.d/z-overrides.conf
55+
56+
CMD ["/usr/sbin/php-fpm8.3", "-O" ]
57+
58+
# Open up fcgi port
59+
EXPOSE 9000

php/8.3/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.3 / CLI, FPM and Swoole container images
2+
3+
Ubuntu 22.04 PHP 8.3 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.3-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.3/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)