filebot / filebot-docker

Docker build files for FileBot
https://hub.docker.com/r/rednoah/filebot/
Apache License 2.0
61 stars 19 forks source link

Container can't be stopped gracefully #8

Closed deepfriedmind closed 3 years ago

deepfriedmind commented 3 years ago
$ docker exec filebot-node stop
OCI runtime exec failed: exec failed: container_linux.go:367: starting container process caused: exec: "stop": executable file not found in $PATH: unknown

docker kill --signal=SIGTERM filebot-node doesn't appear to do anything.

When e.g. Unraid runs docker stop -t <timeout> <container> it always times out and has to be killed.

Piccirello commented 3 years ago

You likely need to run your container with --init.

deepfriedmind commented 3 years ago

That is exactly what I needed. I hadn't heard about that flag before. Thanks!

rednoah commented 3 years ago

If you run the service via docker, then you can use CTRL+C (i.e. send SIGINT to the process) to kill the process:

docker run --rm -it -v $PWD:/volume1 -v data:/data -p 5452:5452 rednoah/filebot:node

I'm not really able to test other usage scenarios, but this might explain why kill --signal=SIGTERM doesn't work? IDK.

deepfriedmind commented 3 years ago

I have filebot-node running constantly (in Unraid, set up via GUI) to receive CURLs and it would halt the system shutdown process for several minutes because the container wouldn't stop gracefully (until I added the --init flag).

rednoah commented 3 years ago

If you're using Unraid then you're probably using jlesage/docker-filebot so you'll want to post a corresponding issue report / workaround there as well: https://github.com/jlesage/docker-filebot/issues

deepfriedmind commented 3 years ago

I'm actually using that one too, for the VNC/GUI, and it stops gracefully. It doesn't have filebot-node though.