devcontainers / devcontainers/features

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

Aperta
#672 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Shell
Stelle
1.5k
Fork
621
Merge medio
6g 53m
PR unite (30g)
9

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.