Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

docker - How to Dockerize windows application

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???

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 $('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:
"Create base container with full GUI support".


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.6k users

...