dockerize a wpf application and use it

10,521

You cannot run a WPF application in docker. Check https://msdn.microsoft.com/en-us/magazine/mt797650.aspx

Share:
10,521

Related videos on Youtube

Ganbo
Author by

Ganbo

Updated on August 22, 2022

Comments

  • Ganbo
    Ganbo over 1 year

    I'm trying to dockerize a wpf application. Just a simple app for that time.

    for now i got this dockerfile :

    FROM microsoft/nanoserver
    WORKDIR C
    run "$PATH"
    #ENTRYPOINT ["C:\Users\TestDev\Documents\Visual Studio 2017\Projects\TestExe\TestExe\bin\Release\TestExe.exe"]
    RUN  ["C:\Users\TestDev\Documents\Visual Studio 2017\Projects\TestExe\TestExe\bin\Release\TestExe.exe"]
    

    Si i tried with entrypoint, run and cmd. But got this error :

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

    And i would like know how it's work after run a container.

    Thanks.

  • Borislav Ivanov
    Borislav Ivanov almost 6 years
    "Docker is for server applications—Web sites, APIs, messaging solutions and other components that run in the background. You can’t run desktop apps in Docker because there’s no UI integration between the Docker platform and the Windows host. That rules out running Windows Forms or Windows Presentation Foundation (WPF) apps in containers (although you could use Docker to package and distribute those desktop apps), but Windows Communication Foundation (WCF), .NET console apps and all flavors of ASP.NET are great candidates."
  • Jan Hudec
    Jan Hudec almost 3 years
    @BorislavIvanov, you can run Linux GUI applications in Docker just fine, because X11 is client-server and you can expose the display to the container (I use xpra as proxy, which also allows detaching and reattaching the application to the display). WPF does not allow that though.