Docker Community Forums

Share and learn in the Docker community.

Gracefully shutdown the docker container with nginx


(Rebaca) #1

i have a centos 7 container and nginx is running inside. I want the docker container to receive a SIGTERM/SIGQUIT signal that can be caught by the containers and allow them to shut down gracefully.
when I do “docker stop $ID” the container is exiting but am not able to see any log files for signal caught.
docker run -itd -p 9090:80 --init --stop-signal SIGQUIT --name nginx nginx
this is the command am using to run the container and inside that init process is running as PID 1
plz help me out to resolve this?