简体   繁体   English

如何Dockerize Windows应用程序

[英]How to Dockerize windows application

i have a windows application which I want to containerize. 我有一个Windows应用程序,我想要容器化。 Its a windows desktop application (not web application). 它是一个Windows桌面应用程序(不是Web应用程序)。 I did some searching and found very little about containerizing desktop application. 我做了一些搜索,发现很少关于容器化桌面应用程序。 The application which I want to containerize works fine on WindowsServerCore. 我想要容器化的应用程序在WindowsServerCore上运行良好。 I have Windowsservercore image on my machine. 我的机器上有Windowsservercore映像。

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??? 当我完成dockerfile我可以与我的应用程序gui交互??? how??? 怎么样???

You can find tons of example of WindowsServiceCore-based applications in StefanScherer/dockerfiles-windows 您可以在StefanScherer/dockerfiles-windows找到大量基于WindowsServiceCore的应用程序示例

You need to write a Dockerfile (like for instance diskspd/Dockerfile where you copy/unzip/install the application you need. 您需要编写一个Dockerfile(例如您在其中复制/解压缩/安装所需应用程序的diskspd/Dockerfile

FROM microsoft/windowsservercore:10.0.14393.1770

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ENV DISKSPD_VERSION 2.0.17

RUN Invoke-WebRequest $('https://gallery.technet.microsoft.com/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: 话虽这么说,仍然要求对windowscoreserver提供完整的GUI支持:
" Create base container with full GUI support" . 创建具有完全GUI支持的基础容器”

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

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