start script exits with errors. npm v7? docker-compose?
Opened this issue · 2 comments
Something changed with how the npm run start
(webpack serve
) process is exiting. It now throws an error which prevents the poststart
script from being called.
I still think it's primarily related to the change in signal propagation in npm v7, briefly touched upon in npm#2124.
But there are also slight changes in how docker-compose is working, especially as Docker migrates away from docker-compose
cli towards the new compose
command.
Finally, the webpack-dev-server v4 beta release notes mention a new setupExitSignals
option which might have something to do with this?.
Too many variables with too many new releases, so I'm shelving this for now (2021-08). Will check back after webpack-dev-server ships v4 -- which looks like it's going to be a lot of work based on how much they're changing.
Upgraded tooling to webpack devserver v4 and set setupExitSignals
, still getting the errors. ideasonpurpose/docker-build@0d70e04
Try running commands using exec form instead of shell form, See note here: https://github.com/Haufe-Lexware/docker-style-guide/blob/master/Dockerfile.md#use-exec-form-rather-than-shell
You MUST write CMD and ENTRYPOINT statements using the Exec-form.
Using the shell form would effectively trigger a call to/bin/sh -c
with the command and parameters you specified.As a result, when you use
docker stop
ordocker kill
the POSIX signal will only be sent to the container process running as PID 1, and if that process is /bin/sh rather than the underlying process you started and /bin/sh doesn't forward signals to any child processes you won't be able to gracefully stop the process.