简体   繁体   English

使用 docker 容器化 .net c# WPF 应用程序

[英]containerizing a .net c# WPF application with docker

I want to deploy a WPF .Net(Version 4.0, C#) Application with Docker since I need to install multiple hardware related software installed before the program starts.我想使用Docker部署WPF .Net(版本 4.0,C#)应用程序,因为我需要在程序启动之前安装多个与硬件相关的软件。 And also want to install java before it because there is java program which needs to run inside this c# application.并且还想在它之前安装 java 因为有需要在这个 c# 应用程序中运行的 java 程序。

Questions:问题:

  1. Is it possible?, which I hope 'Yes' on the basis of what I have read till now有可能吗?,根据我迄今为止所读到的内容,我希望“是”

  2. How I can do it.我该怎么做。

  3. If any other way available for doing it.如果有任何其他方式可以做到这一点。

  4. which would be preferable one.这将是更可取的一个。

Any sort of referential link, video that can help me moving.任何可以帮助我移动的参考链接、视频。 I'll be grateful for this.我会很感激的。

It's not possible to run WPF application in docker container (see this article for more info):无法在 docker 容器中运行 WPF 应用程序(有关更多信息,请参阅本文):

You can't run desktop apps in Docker because there's no UI integration between the Docker platform and the Windows host.您无法在 Docker 中运行桌面应用程序,因为 Docker 平台和 Windows 主机之间没有 UI 集成。 That rules out running Windows Forms or Windows Presentation Foundation (WPF) apps in containers这排除了在容器中运行 Windows 窗体或 Windows Presentation Foundation (WPF) 应用程序

I got the solution of requirement at that time by wix (window installer) https://wixtoolset.org/documentation/我当时通过wix(窗口安装程序) https://wixtoolset.org/documentation/得到了需求的解决方案

with the help of this you can write a xml like code to provide step by step procedures to run and generate a .msi or .exe file.借助此功能,您可以编写类似 xml 的代码,以提供运行和生成 .msi 或 .exe 文件的分步过程。 I hope this will help visitors.我希望这会对游客有所帮助。

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

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