Posts

GNU/make and docker, terminate the running process

Image
up vote 0 down vote favorite I'm using GNU/make (linux) to wrap some docker command, I don't use docker everyday so I'll forget the usage soon, one of those wrapper is make serve , it run docker run with php -S (built-in server) as command, it start and listen for connections. To stop it I should use ^C , I believe (but I'm not sure) the problem to be make intercepting the signal, the make's target fail but the php process (and the docker instance) remain running, I've to manually stop it. I tried passing --sig-proxy=true and false but with no effect, but I'm running the instance with a pseudo terminal ( -t ) so this was expected. I wrote a bash wrapper to echo some message when some signal is trapped ( EXIT TERM SIGTERM SIGQUIT KILL SIGKILL ) and exec php -S , but I don't see any messag...