如何对Windows应用程序进行Dockerize

编程入门 行业动态 更新时间:2024-10-06 16:24:38
本文介绍了如何对Windows应用程序进行Dockerize的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个要打包的Windows应用程序。它是Windows桌面应用程序(不是Web应用程序)。我进行了一些搜索,发现关于容器化桌面应用程序的知识很少。我要容器化的应用程序在WindowsServerCore上运行良好。我的计算机上有Windowsservercore映像。

我想知道如何对其进行容器化。有任何文档或有用的视频吗? 当我完成dockerfile时可以与我的应用程序GUI进行交互吗?

解决方案

您可以在 StefanScherer / dockerfiles-windows

您需要编写一个Dockerfile(例如 diskspd / Dockerfile ,您可以在其中复制/解压缩/安装所需的应用程序。

FROM microsoft / windowsservercore:10.0.14393.1770 SHELL [ powershell, -Command, $ ErrorActionPreference ='Stop'; $ ProgressPreference ='SilentlyContinue';] ENV DISKSPD_VERSION 2.0.17 运行Invoke-WebRequest $('gallery.technet.microsoft/DiskSpd-a-robust-storage-6cd2f223/file/ 152702/1 / Diskspd-v {0} .zip'-f $ env:DISKSPD_VERSION)-OutFile'diskspd.zip'-UseBasicParsing; \ Ex pand-存档diskspd.zip -DestinationPath C:\; \ Remove-Item -Path diskspd.zip; \ Remove-Item -Recurse armfre; \ Remove-Item -Recurse x86fre; \ Remove-Item * .docx; \ Remove-Item * .pdf ENTRYPOINT [ C:\\amd64fre\\diskspd.exe]

话虽如此,仍然需要对Windowscoreserver的完整GUI支持: 创建具有完全GUI支持的基本容器 。 / p>

i have a windows application which I want to containerize. Its a windows desktop application (not web application). I did some searching and found very little about containerizing desktop application. The application which I want to containerize works fine on WindowsServerCore. I have Windowsservercore image on my machine.

I want to know how can I go about containerizing it. Any documentation or useful videos are available? when i completed dockerfile can i interact with my application gui??? how???

解决方案

You can find tons of example of WindowsServiceCore-based applications in StefanScherer/dockerfiles-windows

You need to write a Dockerfile (like for instance diskspd/Dockerfile where you copy/unzip/install the application you need.

FROM microsoft/windowsservercore:10.0.14393.1770 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] ENV DISKSPD_VERSION 2.0.17 RUN Invoke-WebRequest $('gallery.technet.microsoft/DiskSpd-a-robust-storage-6cd2f223/file/152702/1/Diskspd-v{0}.zip' -f $env:DISKSPD_VERSION) -OutFile 'diskspd.zip' -UseBasicParsing ; \ Expand-Archive diskspd.zip -DestinationPath C:\ ; \ Remove-Item -Path diskspd.zip ; \ Remove-Item -Recurse armfre ; \ Remove-Item -Recurse x86fre ; \ Remove-Item *.docx ; \ Remove-Item *.pdf ENTRYPOINT [ "C:\\amd64fre\\diskspd.exe" ]

That being said, a full GUI support for windowscoreserver is still requested: "Create base container with full GUI support".

更多推荐

如何对Windows应用程序进行Dockerize

本文发布于:2023-11-28 06:17:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641263.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   Windows   Dockerize

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!