-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Host shuts down immediately #3195
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
Comments
It should wait for one of these two: |
There are no errors. It runs fine when I launch the container from Visual studio because visual studio adds the "tail" process to the container which is keeping the container alive. When I launch it using Docker run the container stops immediately. |
Yea, it sounds like something is crashing or failing to start. Try running the container interactively and running the process manually inside of it. |
The issue only exists for images built by VisualStudio but not for images built on our build server. Not sure why? Anyway, generic host works as expected. Thanks. |
Closing because it seems the main issues have been resolved. Thanks! |
Moved from the docs repo to here. Originally filed by @srininz77 at dotnet/AspNetCore.Docs#6862
"I'm trying to run a long running background task in a console application inside docker container.
My code is as follows:
**When I use Docker run -d to create the container, the container stops immediately. It doesn't look like RunConsoleAsync() is waiting for ctrl+c or SIGTERM.
I tried GenericHostSample and it behaves the same as well**"
The text was updated successfully, but these errors were encountered: