devcontainers / features

A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own
https://containers.dev/features
MIT License
919 stars 371 forks source link

PHP feature should optionally install xdebug #847

Open razvanphp opened 9 months ago

razvanphp commented 9 months ago

I personally want to use the (production) docker image for my app where I install PHP (and even composer) already, so I just need the option to install xdebug via the features flags, instead of baking this into my Dockerfile.

Would greatly expand the usability for PHP developers of devcontainers.

Thank you! R

samruddhikhandale commented 8 months ago

Hello 👋

From 👇 looks like we already install xdebug with the PHP Feature. This is also baked into the mcr.microsoft.com/devcontainers/php image hosted from https://github.com/devcontainers/images/tree/main/src/php

https://github.com/devcontainers/features/blob/f91ff3cd8de5d33a52d21887963ba7166600cc44/src/php/install.sh#L186-L193

PHP feature should optionally install xdebug

@razvanphp Are you looking for an option which controls this xdebug installation? (as opposed to installing it only when you request a version)

Let me know if I am misunderstanding your question, thanks!