How lunch an wpf application with docker

Hi all,

I’m working on windows 10 pro.
Im trying to run a container with an wpf application.
But…I don’t really don’t know how it’s work.

I did a build for generate my .exe

my dockerfile

FROM microsoft/nanoserver ENTRYPOINT ["Test.exe/bin"]

I tried without copy or add. but I understanded the difference and why.
I think in y case is not necessary.

For ENTRYPOINT i tried too:
[“bin/Release/Test.exe”, “input1”, “output”]

Is it possible to lunch an application with docker and access them?
Or may be a tuto for that.

Thanks for you helping and sorry for my english :slight_smile:
Have a nice day

Did you try?

RUN [“bin/Release/Test.exe”, “input1”, “output”] instead of ENTRYPOINT?

I got this error :

container b24cf78462538036fe7794e731763e33dd594323e4234cfa4e16b647f24832c1 encountered an error during CreateProcess: failure in a Windows system call: Le fichier spécifié est introuvable. (0x2) extra info: {"ApplicationName":"","CommandLine":"bin/Release/Tes.exe input1 output","User":"","WorkingDirectory":"C:\\","Environment":{},"EmulateConsole":false,"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}

My exe is in this folder Test/bin/Release/Test.exe and my dockerfile in Test/.

This Run launched with C:/ directory or at this Test/? Or may be other.

From you log ““WorkingDirectory”:“C:\””

use WORKDIR keyword to provide specified path.

Thanks it’s better apparently but not finish.

UPDATE :
Now i’ve juste this :

The filename, directory name, or volume label syntax is incorrect.


i did that :

FROM microsoft/nanoserver
WORKDIR C
#ENTRYPOINT ["C:\Users\TestDev\Documents\Visual Studio 2017\Projects\Test\TestExe\bin\Release\Test.exe"]
RUN ["C:\Users\TestDev\Documents\Visual Studio 2017\Projects\Test\TestExe\bin\Release\Test.exe", "input1", "output"]

With entrypoint, he finished to build but when i run, he go this error :

The filename, directory name, or volume label syntax is incorrect.
And when i m using RUN :

—> Running in 59d245f21e30
The filename, directory name, or volume label syntax is incorrect.
The command ‘cmd /S /C [“C:\Users\TestDev\Documents\Visual Studio 2017\Projects\Test\TestExe\bin\Release\Test.exe”, “input1”, “output”]’ returned a non-zero code: 1

So i don’t know…i’m trying some tricks.
Did you have a simple exemple?
I took this exemple docker - Running an executable in a dockerfile - Stack Overflow

UP…

It’s possible to know how lunch an application wpf in containers please?