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

start script exits with errors. npm v7? docker-compose? #30

Open
joemaller opened this issue Aug 15, 2021 · 2 comments
Open

start script exits with errors. npm v7? docker-compose? #30

joemaller opened this issue Aug 15, 2021 · 2 comments
Assignees

Comments

@joemaller
Copy link
Member

image

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.

2021-08-15T20_13_32_302Z-debug.log

@joemaller joemaller self-assigned this Aug 15, 2021
@joemaller
Copy link
Member Author

Upgraded tooling to webpack devserver v4 and set setupExitSignals, still getting the errors. ideasonpurpose/docker-build@0d70e04

joemaller added a commit that referenced this issue Oct 14, 2021
@joemaller
Copy link
Member Author

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 or docker 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.

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

No branches or pull requests

1 participant