Unable to execute a helloworld exe in MS windows server core container

Hi everyone,
I’m new to docker. I want to execute a helloworld.exe file in a window server core. Managed to build the image but when i execute the command docker run -it ca8f0a1ce759 , i cant get the container to run. Much help would be appreciated. Thank you.
image

1 Like

Hi, I have slimier problem: .exe seems not working properly. Have you solved this problem?

Yes. You need to find the dependencies needed for your .exe file. You can use the powershell command to install those dependencies in your docker file. Hope that helps.

Hi, thank you for dealing with it. After that post, I could find the solution as you describes. I used dependency walker to find the dependent .dlls and copy and paste them to same directory of .exe.
Also, my .exe file which was built on “visual studio 2015” seems to be executed on specific environments. To construct them, I added following lines in Dockerfile:

# Install the Visual C++ redistributable package for VS2015
ADD https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963AEAD48/vc_redist.x64.exe /vc_redist.x64.exe
RUN C:/vc_redist.x64.exe /quiet /install

No problem . My bad for the late reply I’m glad it helps . :slight_smile: