devcontainers / devcontainers/features

The PHP feature has a very bad performance (in GitHub Codespaces)

Offen
#672 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Shell
Sterne
1.5k
Forks
621
Ø Merge
2 T. 11 Std.
Gemergte PRs (30 T.)
4

Beschreibung

I can use this e.g. as the image: `mcr.microsoft.com/devcontainers/php`

In GitHub Codespaces that results in _that_:
![grafik](https://github.com/devcontainers/templates/assets/11966684/745c9139-1dc5-41e5-b76b-05183ac69245)

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"
}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.