I have a docker container that runs nginx on debian. In response to some input, I need to restart the nginx service but not the whole container. Running "service nginx restart" blows the whole container away.
Is there any way to restart a service in a docker container without restarting the whole container?
2
Answers
You can go inside the container and restart the nginx
Of course it’s recommended to rebuild the container when you do the changes, but I recommend
reload
ing thenginx
service with either runningbash
inside of container and then reload it:Then run
service nginx reload
.Or: