You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great project, thanks for your work! I am trying to run log4brains in Docker and I encounter the following. If I have time I will try to submit a PR fixing this, but for now I will submit the issue.
Description
Ctrl-C does not stop log4brains preview when run in Docker
Steps to Reproduce
Run 'log4brains preview' in Docker with the following command:
docker run --rm -ti -v $(pwd):/workdir -p 4004:4004 thomvaill/log4brains preview
Press ctrl-c
The container does not stop
Expected Behavior
In step 3, log4brains and the container should stop.
Context
You can stop the container by running docker ps and running docker stop <container id> but this is cumbersome.
Environment
Log4brains version: the version in Docker image (1.0.0-beta.11) thomvaill/log4brains latest 7bb84c921b02 6 weeks ago 412MB
Node.js version: version in Docker image
OS and its version: version in Docker image
Browser information: Firefox
Possible Solution
I do not have a solution right now, but maybe playing with the Docker entrypoint / cmd can fix this.
The text was updated successfully, but these errors were encountered:
Node.js was not designed to run as PID 1 which leads to unexpected behaviour when running inside of Docker. For example, a Node.js process running as PID 1 will not respond to SIGINT (CTRL-C) and similar signals. As of Docker 1.13, you can use the --init flag to wrap your Node.js process with a lightweight init system that properly handles running as PID 1.
docker run -it --init node
You can also include Tini directly in your Dockerfile, ensuring your process is always started with an init wrapper.
Bug Report
Great project, thanks for your work! I am trying to run log4brains in Docker and I encounter the following. If I have time I will try to submit a PR fixing this, but for now I will submit the issue.
Description
Ctrl-C does not stop log4brains preview when run in Docker
Steps to Reproduce
Expected Behavior
In step 3, log4brains and the container should stop.
Context
You can stop the container by running
docker ps
and runningdocker stop <container id>
but this is cumbersome.Environment
thomvaill/log4brains latest 7bb84c921b02 6 weeks ago 412MB
Possible Solution
I do not have a solution right now, but maybe playing with the Docker entrypoint / cmd can fix this.
The text was updated successfully, but these errors were encountered: