title: docker container exits immediately even with Console.ReadLine() in a .NET Core console application
body: <p>I am trying to run a .NET Core 1.0.0 console application inside a docker container.<br />
  When I run <code>dotnet run</code> command from inside the Demo folder on my machine, it works fine; but when run using <code>docker run -d --name demo Demo</code>, the container exits immediately.</p>
  <p>I tried <code>docker logs demo</code> to check the logs and it just shows the text from the Console.WriteLine:</p>
  <blockquote>
  <p>Demo app running...</p>
  </blockquote>
  <p>and nothing else.</p>
  <p>I have uploaded the project at <a href="https://github.com/learningdockerandnetcore/Demo" rel="noreferrer">https://github.com/learningdockerandnetcore/Demo</a></p>
  <p>The project contains <code>Programs.cs</code>, <code>Dockerfile</code> used to create Demo image, and <code>project.json</code> file.</p>