2

I am trying to ship a C++ project as an .exe file in a docker nanoserver container. I understand that nanoserver can only run x64 executables, so I double-checked that the executable is built for x64.

The project is not based on Visual C++ and does not include any .NET libraries.

If I run the .exe within the container it just silently exits without any output. Is there a way to check why the exe won't run inside the container? I am able to connect to the container via powershell.

The dockerfile that I used:

ROM mcr.microsoft.com/windows/nanoserver:10.0.14393.953

WORKDIR /app
COPY ./data /app

EXPOSE 3002

CMD ["./app.exe"]
Janis Jansen
  • 996
  • 1
  • 16
  • 36
  • Do you have access to the Windows desktop remotely? I imagine some GUI error dialog pops up. – Nikos C. May 24 '19 at 08:19
  • As far as I know, there is no way to connect to windows docker containers via RDP as neither servercore nor nanoserver support GUI? Please correct me if I'm wrong. – Janis Jansen May 24 '19 at 08:28
  • 2
    I don't know. When an exe fails like that, the usual error is a GUI dialog telling you it couldn't find a DLL. So check which DLLs your exe needs. This depends on what compiler you used to build it (mingw or visual c++.) – Nikos C. May 24 '19 at 08:31
  • Have you tried including the VC+ redist directory with the binary? – Stephen Gennard Jun 18 '19 at 08:39

1 Answers1

0

The solution to this problem actually was an GUI Output that I obviously could not see. After fixing the bug that produced the Popup everything worked fine.

Janis Jansen
  • 996
  • 1
  • 16
  • 36