MVC Net Core with Docker Containers Benefits

一个人想着一个人 提交于 2019-12-08 10:52:05

问题


I am creating a simple MVC Net Core app with C# backend, and ASP CSS/html/Razor front end. It is a simple start project where customers can create orders, buy books, and place into a shopping cart. How would Docker images support this? Or would this be an overkill for MVC.


回答1:


It's not overkill. It's actually quite simple and the dockerization brings a lot of advantages. Read for example the .Net Core dockerization page on Docker docs: https://docs.docker.com/engine/examples/dotnetcore/

Some of the advantages are:

  • Portability: You can take a known to work image and put it in another environment (dev/testing/staging/production)
  • Isolation from the host system
  • Scalability: Take the app container to a cloud provider and run instances based on load

You have to think about persistance: You shouldn't store data in the docker container because this can easily be lost when removing the container. Usually you start a database container next to your app container and store it's data in a volume or on the host filesystem.



来源:https://stackoverflow.com/questions/55757748/mvc-net-core-with-docker-containers-benefits

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!