Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to propogate signals to Docker container #441

Open
scottwlyft opened this issue Apr 11, 2022 · 0 comments
Open

Failure to propogate signals to Docker container #441

scottwlyft opened this issue Apr 11, 2022 · 0 comments
Assignees
Labels

Comments

@scottwlyft
Copy link

Describe the bug
When running dejavu in a docker container in the foreground, SIGINT and SIGTERM signals are not propagating to the process.

Dejavu Version
Docker image: latest (as of 4/11/22)

To Reproduce
Steps to reproduce the behavior:

  1. Run docker run -p 1358:1358 --rm appbaseio/dejavu
  2. Press Ctrl+C

Expected behavior
The container should exit after pressing Ctrl+C

Desktop (please complete the following information):

  • OS: MacOS 12.3.1

Additional context
This is likely due to not using the exec syntax when running the CMD for node. This is a good article explaining it https://hynek.me/articles/docker-signals/
The likely fix is to use this form CMD ["node", "packages/dejavu-main/server.js"] in the Dockerfile. This is important because it enables any program that orchestrates running multiple processes (for example running elasticsearch, dejavu and and app) to safely kill this running container at shutdown time. It also allows the docker stop command to safely stop the dejavu server without using a force kill.

I ran into a yarn build error when trying to run docker build locally otherwise I would have put up a PR with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants