Skip to content

Commit d617727

Browse files
PHP: Support for debian - bookworm (devcontainers#624)
* php * fix test
1 parent 03a3f1c commit d617727

File tree

4 files changed

+42
-16
lines changed

4 files changed

+42
-16
lines changed

src/php/.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# [Choice] PHP version (use -bullseye variants on local arm64/Apple Silicon): 8-apache-bullseye, 8.2-apache-bullseye, 8.1-apache-bullseye, 8.0-apache-bullseye, 8-apache-buster, 8.2-apache-buster, 8.1-apache-buster, 8.0-apache-buster
2-
ARG VARIANT=8.2-apache-bullseye
1+
# [Choice] PHP version (use -bullseye variants on local arm64/Apple Silicon): 8-apache-bookworm, 8.2-apache-bookworm, 8.1-apache-bookworm, 8.0-apache-bookworm, 8-apache-bullseye, 8.2-apache-bullseye, 8.1-apache-bullseye, 8.0-apache-bullseye, 8-apache-buster, 8.2-apache-buster, 8.1-apache-buster, 8.0-apache-buster
2+
ARG VARIANT=8.2-apache-bookworm
33
FROM php:${VARIANT}
44

55
# Install xdebug

src/php/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
| *Categories* | Languages |
1010
| *Image type* | Dockerfile |
1111
| *Published images* | mcr.microsoft.com/devcontainers/php |
12-
| *Available image variants* | 8 / 8-bullseye, 8.2 / 8.2-bullseye, 8.1 / 8.1-bullseye, 8.0 / 8.0-bullseye, 8-buster, 8.2-buster, 8.1-buster, 8.0-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/php/tags/list)) |
13-
| *Published image architecture(s)* | x86-64, arm64/aarch64 for `bullseye` variants |
12+
| *Available image variants* | 8 / 8-bookworm, 8.2 / 8.2-bookworm, 8.1 / 8.1-bookworm, 8.0 / 8.0-bookworm, 8-bullseye, 8.2-bullseye, 8.1-bullseye, 8.0-bullseye, 8-buster, 8.2-buster, 8.1-buster, 8.0-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/php/tags/list)) |
13+
| *Published image architecture(s)* | x86-64, arm64/aarch64 for `bookworm`, and `bullseye` variants |
1414
| *Container host OS support* | Linux, macOS, Windows |
1515
| *Container OS* | Debian |
1616
| *Languages, platforms* | PHP |
@@ -22,18 +22,18 @@ See **[history](history)** for information on the contents of published images.
2222
You can directly reference pre-built versions of `Dockerfile` by using the `image` property in `.devcontainer/devcontainer.json` or updating the `FROM` statement in your own `Dockerfile` with one of the following:
2323

2424
- `mcr.microsoft.com/devcontainers/php` (latest)
25-
- `mcr.microsoft.com/devcontainers/php:8` (or `8-bullseye`, `8-buster` to pin to an OS version)
26-
- `mcr.microsoft.com/devcontainers/php:8.2` (or `8.2-bullseye`, `8.2-buster` to pin to an OS version)
27-
- `mcr.microsoft.com/devcontainers/php:8.1` (or `8.1-bullseye`, `8.1-buster` to pin to an OS version)
28-
- `mcr.microsoft.com/devcontainers/php:8.0` (or `8.0-bullseye`, `8.0-buster` to pin to an OS version)
25+
- `mcr.microsoft.com/devcontainers/php:8` (or `8-bookworm`, `8-bullseye`, `8-buster` to pin to an OS version)
26+
- `mcr.microsoft.com/devcontainers/php:8.2` (or `8.2-bookworm`, `8.2-bullseye`, `8.2-buster` to pin to an OS version)
27+
- `mcr.microsoft.com/devcontainers/php:8.1` (or `8.1-bookworm`, `8.1-bullseye`, `8.1-buster` to pin to an OS version)
28+
- `mcr.microsoft.com/devcontainers/php:8.0` (or `8.0-bookworm`, `8.0-bullseye`, `8.0-buster` to pin to an OS version)
2929

3030
Refer to [this guide](https://containers.dev/guide/dockerfile) for more details.
3131

3232
You can decide how often you want updates by referencing a [semantic version](https://semver.org/) of each image. For example:
3333

34-
- `mcr.microsoft.com/devcontainers/php:0-8` (or `0-8-bullseye`, `0-8-buster`)
35-
- `mcr.microsoft.com/devcontainers/php:0.203-8` (or `0.203-8-bullseye`, `0.203-8-buster`)
36-
- `mcr.microsoft.com/devcontainers/php:0.203.3-8` (or `0.203.3-8-bullseye`, `0.203.3-8-buster`)
34+
- `mcr.microsoft.com/devcontainers/php:0-8` (or `0-8-bookworm`, `0-8-bullseye`, `0-8-buster`)
35+
- `mcr.microsoft.com/devcontainers/php:0.203-8` (or `0.203-8-bookworm`, `0.203-8-bullseye`, `0.203-8-buster`)
36+
- `mcr.microsoft.com/devcontainers/php:0.203.3-8` (or `0.203.3-8-bookworm`, `0.203.3-8-bullseye`, `0.203.3-8-buster`)
3737

3838
However, we only do security patching on the latest [non-breaking, in support](https://github.com/devcontainers/images/issues/90) versions of images (e.g. `0-8`). You may want to run `apt-get update && apt-get upgrade` in your Dockerfile if you lock to a more specific version to at least pick up OS security updates.
3939

src/php/manifest.json

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"version": "0.203.25",
33
"variants": [
4+
"8.2-apache-bookworm",
5+
"8.1-apache-bookworm",
6+
"8.0-apache-bookworm",
47
"8.2-apache-bullseye",
58
"8.1-apache-bullseye",
69
"8.0-apache-bullseye",
@@ -9,9 +12,21 @@
912
"8.0-apache-buster"
1013
],
1114
"build": {
12-
"latest": "8.2-apache-bullseye",
15+
"latest": "8.2-apache-bookworm",
1316
"rootDistro": "debian",
1417
"architectures": {
18+
"8.2-apache-bookworm": [
19+
"linux/amd64",
20+
"linux/arm64"
21+
],
22+
"8.1-apache-bookworm": [
23+
"linux/amd64",
24+
"linux/arm64"
25+
],
26+
"8.0-apache-bookworm": [
27+
"linux/amd64",
28+
"linux/arm64"
29+
],
1530
"8.2-apache-bullseye": [
1631
"linux/amd64",
1732
"linux/arm64"
@@ -38,19 +53,30 @@
3853
"php:${VERSION}-${VARIANT}"
3954
],
4055
"variantTags": {
41-
"8.2-apache-bullseye": [
56+
"8.2-apache-bookworm": [
4257
"php:${VERSION}-8",
4358
"php:${VERSION}-8.2",
59+
"php:${VERSION}-8-bookworm",
60+
"php:${VERSION}-8.2-bookworm",
61+
"php:${VERSION}-bookworm"
62+
],
63+
"8.1-apache-bookworm": [
64+
"php:${VERSION}-8.1",
65+
"php:${VERSION}-8.1-bookworm"
66+
],
67+
"8.0-apache-bookworm": [
68+
"php:${VERSION}-8.0",
69+
"php:${VERSION}-8.0-bookworm"
70+
],
71+
"8.2-apache-bullseye": [
4472
"php:${VERSION}-8-bullseye",
4573
"php:${VERSION}-8.2-bullseye",
4674
"php:${VERSION}-bullseye"
4775
],
4876
"8.1-apache-bullseye": [
49-
"php:${VERSION}-8.1",
5077
"php:${VERSION}-8.1-bullseye"
5178
],
5279
"8.0-apache-bullseye": [
53-
"php:${VERSION}-8.0",
5480
"php:${VERSION}-8.0-bullseye"
5581
],
5682
"8.2-apache-buster": [

src/php/test-project/test-utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ checkCommon()
121121
libc6 \
122122
libgcc1 \
123123
libgssapi-krb5-2 \
124-
liblttng-ust0 \
124+
liblttng-ust1 \
125125
libstdc++6 \
126126
zlib1g \
127127
locales \

0 commit comments

Comments
 (0)