Skip to content

Commit f7ef09f

Browse files
authored
Merge branch 'main' into add-php-8.4
2 parents a63eb9a + a49d630 commit f7ef09f

4 files changed

Lines changed: 245 additions & 21 deletions

File tree

.github/workflows/docker-image.v1.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,11 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
php-type: [cli, fpm, apache]
16-
php-version: ['8.3', '8.2', '8.1', '7']
17-
php-base-os: [bullseye, bookworm, alpine]
16+
php-version: ['8.3', '8.2']
17+
php-base-os: [bookworm, alpine]
1818
exclude:
1919
- php-type: apache
2020
php-base-os: alpine
21-
- php-version: '7'
22-
php-base-os: bookworm
23-
- php-version: '8.3'
24-
php-base-os: bullseye
25-
- php-version: '8.2'
26-
php-base-os: bullseye
27-
- php-version: '8.1'
28-
php-base-os: bullseye
2921

3022
steps:
3123
- name: Checkout source

README.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Multi-architecture PHP Docker images with extensive extensions for modern web de
55
[![Docker Pulls](https://img.shields.io/docker/pulls/kingpin/php-docker)](https://hub.docker.com/r/kingpin/php-docker)
66
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/kingpin/php-docker/docker-ci.yml?branch=main)](https://github.com/kingpin/php-docker/actions/workflows/docker-ci.yml)
77

8+
> **⚠️ Deprecation Notice**: PHP 7.x, 8.0 and 8.1 builds are **no longer published**. Existing images remain available in registries for backwards compatibility. See [Deprecated Versions](#deprecated-versions) below.
9+
810
## 🎯 Which Image Should I Use?
911

1012
**New projects or need process supervision?** → Use **v2** images (e.g., `8.3-fpm-alpine-v2`)
@@ -15,7 +17,7 @@ See [v1 vs v2 comparison](#v1-vs-v2-comparison) below for details.
1517
## Features
1618

1719
- **Multi-Architecture Support**: Works on `amd64`, `arm64/aarch64` and `arm32v7/armhf` platforms
18-
- **Multiple PHP Versions**: PHP 7.x (deprecated), 8.1, 8.2, and 8.3
20+
- **Multiple PHP Versions**: PHP 8.2 and 8.3 (actively built); PHP 7, 8 and 8.1 deprecated
1921
- **Multiple Server Types**: CLI, FPM, and Apache
2022
- **Base OS Options**: Alpine (lightweight) and Debian (Bookworm/Bullseye)
2123
- **Extensive Extensions**: 30+ PHP extensions pre-installed
@@ -324,23 +326,29 @@ Both v1 and v2 variants are available for all combinations below:
324326
| 8.4 | FPM | Alpine | `8.4-fpm-alpine` | `8.4-fpm-alpine-v2` |
325327
| 8.4 | FPM | Bookworm | `8.4-fpm-bookworm` | `8.4-fpm-bookworm-v2` |
326328
| 8.4 | Apache | Bookworm | `8.4-apache-bookworm` | `8.4-apache-bookworm-v2` |
327-
| 8.1 | CLI | Alpine | `8.1-cli-alpine` | `8.1-cli-alpine-v2` |
328-
| 8.1 | CLI | Bookworm | `8.1-cli-bookworm` | `8.1-cli-bookworm-v2` |
329-
| 8.1 | FPM | Alpine | `8.1-fpm-alpine` | `8.1-fpm-alpine-v2` |
330-
| 8.1 | FPM | Bookworm | `8.1-fpm-bookworm` | `8.1-fpm-bookworm-v2` |
331-
| 8.1 | Apache | Bookworm | `8.1-apache-bookworm` | `8.1-apache-bookworm-v2` |
332329

333330
> **Note:** PHP 8.1+ images are built on Bookworm (Debian 12). Bullseye tags redirect to Bookworm for PHP 8.1+.
334331
335332
### Deprecated Tags (v1 only)
336333

337-
PHP 7.x images are available but no longer actively maintained:
334+
The following tags are deprecated and will not be built going forward, but remain available in registries for backwards compatibility:
335+
336+
- PHP 7.x:
337+
- `7-cli-bullseye`, `7-cli-alpine`
338+
- `7-fpm-bullseye`, `7-fpm-alpine`
339+
- `7-apache-bullseye`
338340

339-
- `7-cli-bullseye`, `7-cli-alpine`
340-
- `7-fpm-bullseye`, `7-fpm-alpine`
341-
- `7-apache-bullseye`
341+
- PHP 8.0:
342+
- `8-cli-bullseye`, `8-cli-alpine`
343+
- `8-fpm-bullseye`, `8-fpm-alpine`
344+
- `8-apache-bullseye`
342345

343-
> **Important:** PHP 7.x has reached end-of-life. Please upgrade to PHP 8.1+ for security and performance.
346+
- PHP 8.1:
347+
- `8.1-cli-bullseye`, `8.1-cli-bookworm`, `8.1-cli-alpine`
348+
- `8.1-fpm-bullseye`, `8.1-fpm-bookworm`, `8.1-fpm-alpine`
349+
- `8.1-apache-bullseye`, `8.1-apache-bookworm`
350+
351+
> **Important:** These versions are deprecated. Please upgrade to PHP 8.2 or 8.3 for security and performance.
344352
345353
## 📊 Image Sizes
346354

@@ -450,6 +458,25 @@ COPY custom-php.ini /usr/local/etc/php/conf.d/
450458
RUN install-php-extensions swoole
451459
```
452460

461+
## Deprecated Versions
462+
463+
The following PHP versions are **no longer actively built** but remain available in registries for backwards compatibility:
464+
465+
### PHP 7.x (End of Life)
466+
- All PHP 7.x images (7.4 and earlier)
467+
- Last published: January 2025
468+
- Available tags: `7-cli-alpine`, `7-fpm-alpine`, `7-apache-bullseye`, etc.
469+
470+
### PHP 8.1 (End of Active Support)
471+
- All PHP 8.1 images
472+
- Last published: January 2025
473+
- Available tags: `8.1-cli-alpine`, `8.1-fpm-alpine`, `8.1-apache-bookworm`, etc.
474+
475+
**Migration Path:**
476+
- Upgrade to PHP 8.2 or 8.3 for continued security updates and new builds
477+
- See [migration guide](docs/migration.md) for upgrade assistance
478+
- Existing images will remain available in Docker Hub, GHCR, and Quay.io
479+
453480
## 🏗️ Architecture Diagram
454481
```
455482
┌───────────────┐

docs/deprecated-images.md

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# Deprecated PHP Docker Images
2+
3+
This document lists PHP versions that are **no longer actively built** but remain available in container registries for backwards compatibility.
4+
5+
## ℹ️ Important Notice
6+
7+
- **No new builds** will be published for these versions
8+
- **No security updates** will be applied to these images
9+
- **Existing images remain available** for download from Docker Hub, GHCR, and Quay.io
10+
- **Migration is strongly recommended** for production workloads
11+
12+
## Deprecated Versions
13+
14+
### PHP 7.x (All Variants)
15+
16+
**Status**: End of Life - No longer maintained by PHP project
17+
**Last Build**: January 2025
18+
**Reason**: PHP 7.4 reached end-of-life November 2022
19+
20+
#### Available Tags (Legacy)
21+
22+
**Alpine-based:**
23+
- `7-cli-alpine`
24+
- `7-fpm-alpine`
25+
- `7-cli-alpine-v2`
26+
- `7-fpm-alpine-v2`
27+
28+
**Debian Bullseye-based:**
29+
- `7-cli-bullseye`
30+
- `7-fpm-bullseye`
31+
- `7-apache-bullseye`
32+
- `7-cli-bullseye-v2`
33+
- `7-fpm-bullseye-v2`
34+
- `7-apache-bullseye-v2`
35+
36+
**Architectures**: linux/amd64, linux/arm64, linux/arm/v7
37+
38+
### PHP 8.1 (All Variants)
39+
40+
**Status**: End of Active Support (security-only updates until Nov 2025)
41+
**Last Build**: January 2025
42+
**Reason**: Focus maintenance on PHP 8.2+ for better resource allocation
43+
44+
#### Available Tags (Legacy)
45+
46+
**Alpine-based:**
47+
- `8.1-cli-alpine`
48+
- `8.1-fpm-alpine`
49+
- `8.1-cli-alpine-v2`
50+
- `8.1-fpm-alpine-v2`
51+
52+
**Debian Bookworm-based:**
53+
- `8.1-cli-bookworm`
54+
- `8.1-fpm-bookworm`
55+
- `8.1-apache-bookworm`
56+
- `8.1-cli-bookworm-v2`
57+
- `8.1-fpm-bookworm-v2`
58+
- `8.1-apache-bookworm-v2`
59+
60+
**Architectures**: linux/amd64, linux/arm64, linux/arm/v7
61+
62+
## Migration Recommendations
63+
64+
### From PHP 7.x → PHP 8.2 or 8.3
65+
66+
**Breaking Changes to Consider:**
67+
- Deprecated features removed in PHP 8.0+
68+
- Stricter type handling
69+
- Changes to error reporting
70+
- Removed legacy extensions
71+
72+
**Steps:**
73+
1. Review [PHP 8 migration guide](https://www.php.net/manual/en/migration80.php)
74+
2. Test your application locally with PHP 8.2 or 8.3
75+
3. Update dependencies in `composer.json`
76+
4. Run automated tests
77+
5. Update Docker image tags
78+
79+
**Example:**
80+
```bash
81+
# Old (deprecated)
82+
docker pull kingpin/php-docker:7-fpm-alpine
83+
84+
# New (recommended)
85+
docker pull kingpin/php-docker:8.3-fpm-alpine
86+
```
87+
88+
### From PHP 8.1 → PHP 8.2 or 8.3
89+
90+
**Breaking Changes:**
91+
- PHP 8.2: Deprecated dynamic properties
92+
- PHP 8.3: More readonly class features
93+
94+
**Steps:**
95+
1. Review [PHP 8.2 migration guide](https://www.php.net/manual/en/migration82.php) or [PHP 8.3 guide](https://www.php.net/manual/en/migration83.php)
96+
2. Update image tags in your deployment manifests
97+
3. Test thoroughly in staging environment
98+
4. Deploy to production
99+
100+
**Example:**
101+
```bash
102+
# Old (deprecated)
103+
docker pull kingpin/php-docker:8.1-fpm-alpine
104+
105+
# New (recommended)
106+
docker pull kingpin/php-docker:8.3-fpm-alpine
107+
```
108+
109+
### Docker Compose Migration
110+
111+
```yaml
112+
# Before (deprecated)
113+
services:
114+
app:
115+
image: kingpin/php-docker:8.1-fpm-alpine
116+
117+
# After (recommended)
118+
services:
119+
app:
120+
image: kingpin/php-docker:8.3-fpm-alpine
121+
```
122+
123+
### Kubernetes/Helm Migration
124+
125+
```yaml
126+
# Before (deprecated)
127+
containers:
128+
- name: app
129+
image: kingpin/php-docker:8.1-fpm-alpine
130+
131+
# After (recommended)
132+
containers:
133+
- name: app
134+
image: kingpin/php-docker:8.3-fpm-alpine
135+
```
136+
137+
## Long-Term Availability
138+
139+
### Registry Retention
140+
141+
These deprecated images will remain available **indefinitely** in the following registries:
142+
- **Docker Hub**: hub.docker.com/r/kingpin/php-docker
143+
- **GitHub Container Registry**: ghcr.io/kingpin/php-docker
144+
- **Quay.io**: quay.io/kingpinx1/php-docker
145+
146+
### Pulling Deprecated Images
147+
148+
You can continue to pull these images as normal:
149+
150+
```bash
151+
# PHP 7.x example
152+
docker pull kingpin/php-docker:7-fpm-alpine
153+
154+
# PHP 8.1 example
155+
docker pull kingpin/php-docker:8.1-fpm-alpine
156+
```
157+
158+
### Security Considerations
159+
160+
**Important**: Deprecated images will NOT receive:
161+
- Security patches for PHP vulnerabilities
162+
- Updates to bundled system packages
163+
- Updates to PHP extensions
164+
- Bug fixes
165+
166+
**For production use**, we strongly recommend migrating to actively supported versions (PHP 8.2 or 8.3).
167+
168+
## Support Policy
169+
170+
- **Active Builds**: PHP 8.2 and 8.3 (receive regular updates)
171+
- **Deprecated**: PHP 7.x and 8.1 (images frozen, no updates)
172+
- **Removed**: None (all previously published images remain available)
173+
174+
## Image Digests (Last Published)
175+
176+
For reproducible builds, you can pin to specific digests. Contact the maintainer or check registry APIs for exact digest values of the last published builds.
177+
178+
Example of digest pinning:
179+
```bash
180+
# Pin to specific digest (immutable)
181+
docker pull kingpin/php-docker@sha256:abcdef1234567890...
182+
```
183+
184+
## Questions or Issues?
185+
186+
If you need assistance migrating from deprecated versions:
187+
188+
1. Check the [migration guide](migration.md)
189+
2. Review [troubleshooting guide](troubleshooting.md)
190+
3. Open an issue on GitHub with:
191+
- Current deprecated version you're using
192+
- Target version you want to migrate to
193+
- Specific migration challenges
194+
195+
## Timeline
196+
197+
- **November 2024**: Announcement of deprecation plan
198+
- **January 2025**: Last builds for PHP 7.x and 8.1
199+
- **Ongoing**: Images remain available in registries indefinitely
200+
201+
---
202+
203+
Last updated: January 2025

docs/migration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This guide helps you migrate from v1 (legacy) to v2 (modern) PHP Docker images.
44

5+
> **ℹ️ Note on Deprecated Versions**: PHP 7.x and 8.1 are no longer actively built. If you're using these versions, please also review the [deprecated images guide](deprecated-images.md) for upgrade paths to PHP 8.2 or 8.3.
6+
57
## Should You Migrate?
68

79
**Consider migrating to v2 if:**

0 commit comments

Comments
 (0)