devcontainers / devcontainers/features
The PHP feature has a very bad performance (in GitHub Codespaces)
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 621
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 4
Description
I can use this e.g. as the image: `mcr.microsoft.com/devcontainers/php`
In GitHub Codespaces that results in _that_:

It is slow, very slow, because – I guess – it _literally_ compiles PHP – given [it depends on the official PHP docker container](https://github.com/devcontainers/images/blob/992d14db469202201020633827c2eb8857ba3ea7/src/php/.devcontainer/Dockerfile#L3) and they famously compile Docker from scratch there.
I just wonder why nothing is cached? Afterall, it should not build for minutes and these basic images should be cached.
For "quick development", which GitHub Codespaces is aimed at, that is a no-go.
This is my full `.devcontainer` file:
```json
{
"name": "PHP",
"image": "mcr.microsoft.com/devcontainers/php",
"customizations": {
"vscode": {
"extensions": [
"github.codespaces",
"DEVSENSE.phptools-vscode",
"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint",
"raymondcamden.CSSLint",
"DEVSENSE.composer-php-vscode"
]
},
"codespaces": {
"repositories": {
"PrivateBin/*": {
"permissions": {
"pull_requests": "write"
}
}
}
}
},
"forwardPorts": [
8080
],
"features": {
"ghcr.io/devcontainers/features/php:1": {
"installComposer": true,
"version": "latest"
}
},
"postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html",
"postStartCommand": "apache2ctl start"
}
```
Contributor guide
Assessment
This issue has not been assessed yet.