We have been starting to convert our Microservices to containers and we have been successful with the help of visual studio 2017. The process as straight as it can be, using the dockerfile generated from the add docker support feature(I answer a question about this here ). Then we can obviously debug and run it from visual studio without any problems. If i stop and then start the same container again from Kitematic, it doesn't work.
We tried to extract the working container by using the following commands:
docker save name:tag -o [path_to_file]\Image.tar
docker load -i [path_to_file]\Image.tar
docker run -t -d -p 8080:80 name:tag
when we run docker ps everything runs fine, the status is Up, with the defined ports, but is not responding to any HTTP requests.
What are we missing?
In meantime i was able to solve the problem, but looks like a strange solution. If you end up having the container running just fine in Debug but not in release, i advice you to:
Don't use .Net Standard projects with .net core dependencies (in our case we end up using a GlobalExceptionFilter in a .NET Standard project).
To solve this problem you can make a nuget with this dependencies and then use it across projects. (the nuget in this case is here for exemplification: https://www.nuget.org/packages/Backend.BaseApi)
If you are not successful, you can always change everything to .Net Core, or start a new application, run in release, and incrementally add code to troubleshoot the problem.
Good luck