Container doesn't stop on SIGINT
Closed this issue · 1 comments
sycured commented
The container needs to stop on SIGINT (CTRL+C)
How to reproduce
- Start the container using
docker run --rm -p 8080:8080 geosolutionsit/geoserver:2.19.1
- Waiting to see:
INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [30964] milliseconds
catalina.sh run
- Doing SIGINT doing CTRL+C, you'll see something like:
^C^C^C^C^C^C^C^C^C^C
(one for each time you send it)
Expected behavior
The container stop on receiving SIGINT
Actual behavior
SIGINT isn't handled and the container needs to be stopped using docker stop
via another terminal
Workaround
Starting the container using --init
flag: docker run --rm --init -p 8080:8080 geosolutionsit/geoserver:2.19.1
Possible fix
- updating the documentation about
--init
flag - using an init directly inside the container like s6-overlay
Additional information
randomorder commented
that's interesting I don't see a strong enough point to add this external dependency to the image
Thank you anyway