Skip to content

devcontainer: Fixed Dev Containers setup #4556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2025

Conversation

thiagocferr
Copy link
Contributor

The current setup for Dev Containers was not working, with multiple different errors. So, in order to restore its functionality (and allow for things like linting and debugging), the following changes were made:

  • The Dockerfile was severely alterered. Now, the docker-php-ext-enable binary is installed before its usage, it points to the correct PHP binary, and we install Composer for for loading dev-dependencies later-on;

  • Moved the "postCreateCommand" section (defined on the devcontainer.json file) into its own script file (for a more readable experience);

  • On the post-creation script, moved the xdebug.ini to the correct directory (alongside the PHP-FPM bin), installed PHPUnit, PHPCodesniffer (and the 'PHP Compatibility' sniffer) with Composer on a global location, and changed owner of the cache directory;

  • Changed VSCode-specific customization setting in order to point to the update some binary paths. Also made sure globally-installed composer packages binaries are accessible via PATH.

Closes #4223

The current setup for Dev Containers was not working, with multiple
different errors. So, in order to restore its funcionality (and allow
for things like linting and debugging), the following changes were made:

- The Dockerfile was severely alterered. Now, the `docker-php-ext-enable` binary is installed before its usage,
  it points to the correct PHP binary, and we install Composer for for
  loading dev-dependencies later-on.

- Moved the "postCreateCommand" section (defined on the `devcontainer.json` file) into its own script file (for a
  more readable experience)

- On the post-creation script, moved the `xdebug.ini` to the correct
  directory (alongside the PHP-FPM bin), installed PHPUnit,
  PHPCodesniffer (and the 'PHP Compatibility' sniffer) with Composer on
  a global location, and changed owner of the `cache` directory

- Changed VSCode-specific customization setting in order to point to the
  update some binary paths. Also made sure globally-installed composer
  packages binaries are accessible via PATHdocker-php-ext-enable
@dvikan
Copy link
Contributor

dvikan commented May 24, 2025

@Alkarex @Bockiii Does this PR look good? I'm unfamiliar with devcontainer.

@dvikan dvikan merged commit daef06c into RSS-Bridge:master May 24, 2025
3 checks passed
@Alkarex
Copy link
Contributor

Alkarex commented May 24, 2025

@Alkarex @Bockiii Does this PR look good? I'm unfamiliar with devcontainer.

I have not used the dev container of RSS Bridge, but before this fix, it was for sure not working due in particular to missing packets.
As a matter of personal preference, I would have favoured the packets shipped by Debian (which is the base image) as opposed to some manual downloads (for composer), and I think docker-php-ext-enable can be skipped as xdebug can be installed without it when sticking to the distribution packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

devcontainer is broken
3 participants