MoShe
MoShe

Reputation: 6427

Stop Solr gracefully when it running in docker

I am running a solr in docker container

My docker ENTRYPOINT is $SOLR_HOME/bin/solr start ${options}

currently when I am running docker stop <container Id> its kill the process but solr stops incorrectly

In order to stop Solr correctly we need to run : $SOLR_HOME/bin/solr stop

How do I config docker to call solr stop command when docker stop <container Id> is executed?

Upvotes: 5

Views: 1811

Answers (1)

Ged
Ged

Reputation: 301

When running $SOLR_HOME/bin/solr stop, the kernel sends a SIGQUIT signal to the process. To duplicate this in docker, you need to run docker kill --signal="SIGQUIT" <ContainerName> rather than docker stop. Docker Stop sends a SIGTERM signal by default.

Upvotes: 6

Related Questions