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?
docker rm -f The final option for stopping a running container is to use the --force or -f flag in conjunction with the docker rm command. Typically, docker rm is used to remove an already stopped container, but the use of the -f flag will cause it to first issue a SIGKILL.
To stop Solr, you can cd to /path/to/solr-5.0. 0/bin and call ./solr stop -p 8983 . This stops the Solr server instance listening on port 8983.
List the containers running for the service & stop them for example docker ps | grep service-name and then stop the container by using docker stop <ID> from above command.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With