How can I reload php.ini from files that were edited after the container was started? Solution posted on stack overflow is quite ugly because we lose the feature that container goes down along with php-fpm.
@Dublerq php-fpm is a process manager which supports the USER2 signal, which is used to reload the config file.
From inside the container:
kill -USR2 1
Outside:
docker exec -it <mycontainer> kill -USR2 1
Complete example:
docker run -d --name test123 php:7.1-fpm-alpine
docker exec -it test123 ps aux
docker exec -it test123 kill -USR2 1
docker exec -it test123 ps aux
Most helpful comment
@Dublerq
php-fpmis a process manager which supports the USER2 signal, which is used to reload the config file.From inside the container:
Outside:
Complete example: