简体   繁体   English

我可以在Docker容器中发布不是ASP.NET 5或ASP.NET Core的.Net应用程序吗?

[英]Can I publish a .Net application which is not ASP.NET 5 or ASP.NET Core in Docker containers?

我们可以在Docker容器中发布不是ASP.NET 5或ASP.NET Core的.Net应用程序吗?

Yes, you can publish other .NET applications based on either the full .NET framework (build your container images on the https://hub.docker.com/r/microsoft/dotnet-framework/ base image) or the .NET Core framework (build your images on the https://hub.docker.com/r/microsoft/dotnet/ as a base). 是的,您可以基于完整的.NET框架(在https://hub.docker.com/r/microsoft/dotnet-framework/基础映像上构建容器映像)发布其他.NET应用程序。框架(以https://hub.docker.com/r/microsoft/dotnet/为基础构建映像)。

Remember that docker hosts services, so you wouldn't publish a Windows client like this, but background processes which typically run on a server. 请记住,Docker托管服务,因此您不会像这样发布Windows客户端,而是发布通常在服务器上运行的后台进程。

So in theory you could convert your Windows services built on the full .NET Framework to be processes running in Docker containers. 因此,从理论上讲,您可以将基于完整.NET Framework构建的Windows服务转换为在Docker容器中运行的进程。 They would not run as Windows services, but rather they would be stopped, started and managed using Docker. 它们不会作为Windows服务运行,而是会使用Docker停止,启动和管理。 If you are accessing other services - message queues, WCF etc, you may need to open ports into/out of your containers for them to talk to each other. 如果您正在访问其他服务(例如消息队列,WCF等),则可能需要打开进/出容器的端口以使它们彼此通信。

Depending on your situation, there may be benefits to doing this, but you should look carefully at whether it's the right direction for you. 视您的情况而定,这样做可能会有好处,但是您应该仔细考虑这是否是正确的方向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM