How to restart php-fpm inside a docker container?

I’m using docker and my container is build over php:5.6-fpm image from php official repo.
Is it somehow possible to restart/reload php-fpm from inside a container?

  • Kubernetes pods versus Docker container in Google's codelabs tutorial
  • /bin/sh: 1: composer: not found
  • Run multiple services inside one docker container [closed]
  • docker cp to container: file name too long
  • Docker volume details for Windows
  • run symfony2 app with docker [File not found.]
  • Avoid persisting mongo data in docker-compose
  • OrientDB Studio is not starting in Docker Container on Windows Server 2016
  • Installing chef-server in a docker container
  • Docker container with ASP.NET Core libraries
  • mingw in docker container no output
  • How to execute docker commands after a process has started
  • One Solution collect form web for “How to restart php-fpm inside a docker container?”

    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
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.