Improve docker entrypoint by supporting of signal handler
As an another step of improving user interaction with clive (related to #251 (closed)) dedicated signal handling should be implemented to correctly perform shutdown of clive (and underlying beekeeper). Scenarios to be covered/tested:
- regular exit from application (ctrl+X)
- external docker stop (which should result in internal propagation of SIGINT to the clive process)
- handling of Ctrl+C pressed in the terminal TUI (similar case to above)
- direct close of whole terminal (internally results in SIGTERM)
We should try to use trap construct in docker entrypoint similary to hived/haf solution: https://gitlab.syncad.com/hive/hive/-/blob/master/docker/docker_entrypoint.sh?ref_type=heads#L67
Edited by Bartek Wrona