You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have problem with ctrl+C signal (does not stop the command when run in Docker). The fix / check commands must stop gracefully when SIGTERM is invoked.
$ docker run --rm -it -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:3-php8.3 check
It looks like it moving pcntl to the lower layer and including it in the Docker image does not solve the problem anyway, but running Docker container with --init makes ctrl+C work properly 🤔.
The change in #7782 is correct anyway, because symfony/console requires pcntl to work with signals.
@hgiesenow do you know what can be the root cause of Fixer not reacting to ctrl+C when running with docker run? When I run Fixer inside container and use ctrl+C inside the container, the Fixer's process stops properly.
$ docker run --rm -it --init -v $(pwd):/code --entrypoint="" fixer:local sh
/code # php-cs-fixer check
PHP CS Fixer 3.48.1-DEV Small Changes by Fabien Potencier, Dariusz Ruminski and contributors.
PHP runtime: 8.3.2
Loaded config default from "/code/.php-cs-fixer.php".
0/1070 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%^C
/code #
fixer:local image used above is a local build (docker build --target dist -t fixer:local .) on branch with correct pcntl.
We currently have problem with ctrl+C signal (does not stop the command when run in Docker). The
fix
/check
commands must stop gracefully when SIGTERM is invoked.$ docker run --rm -it -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:3-php8.3 check
and then ctrl+C should stop the command.
Originally posted by @Wirone in #7782 (comment)
The text was updated successfully, but these errors were encountered: