当我们拥有WebDeploy时,为什么将Docker用于.NET Web应用程序? [英] Why use Docker for .NET web apps when we have WebDeploy?

查看:84
本文介绍了当我们拥有WebDeploy时,为什么将Docker用于.NET Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Microsoft生态系统中,人们一直在使用WebDeploy软件包来快乐地部署Web应用程序,直到Docker出现为止.突然,每个人开始更喜欢使用Docker,而相关文章撰写,讲述如何将WebDeploy部署到Docker映像中.

In the Microsoft ecosystem, people were happily deploying web apps using WebDeploy Packages until Docker came along. Suddenly everyone started preferring to use Docker instead, with articles being written telling how to WebDeploy into a Docker image.

我已经在本文(和其他文章)中搜索了为什么"(why)一词,却没有找到解释,这让我推断答案仅仅是因为Docker".

I've searched this article (and others) for the word "why" and haven't found an explanation, leaving me to infer that the answer is just "because Docker."

我可能过于简化了,但是WebDeploy软件包和Docker映像似乎具有类似的部署目的,并且我不清楚为什么我要采用一个完美的WebDeploy软件包并将其放入Docker映像中.我想念什么? Docker在WebDeploy之外还具有什么其他好处?我什么时候应该选择一个,或者同时使用?

I'm probably oversimplifying, but it seems that WebDeploy Packages and Docker images serve similar purposes for deployment, and it's unclear to me why I would want to take a perfectly good WebDeploy Package and put it in a Docker image. What am I missing? What additional benefits does Docker bring above and beyond what we have with WebDeploy? When should I choose one over the other, or use both together?

推荐答案

泊坞窗功能之一是将执行环境记录在称为映像的档案中.

One of docker feature is to record an execution environment in an archive called an image.

这样,您不必在新计算机上设置完全相同的配置,您只需在支持docker的任何计算机上运行上述映像,就可以假定执行完全相同的环境(相同的Windows,相同的Webdeploy版本,相同的IIS,...)

That way, you don't have to setup the exact same configuration on a new machine, you can simply run said image on any machine supporting docker, and presumably get the exact same environment execution (same Windows, same Webdeploy version, same IIS, ...)

WebDeploy程序包是一个部署工件(例如jar,战争或任何其他工件),其中不包括运行所述工件所需的内容.

A WebDeploy Packages is a deployment artifact (like a jar, war, or any other artifacts), which does not include what is needed to run said artifact.

泊坞窗映像包含已安装并准备执行的所有内容.
您可以在运行时 使用相同的图像( docker run )与:

A docker image includes everything already installed, ready to be executed.
You can have the same image used at runtime (docker run) with:

这篇关于当我们拥有WebDeploy时,为什么将Docker用于.NET Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆