Docker Community Forums

Share and learn in the Docker community.

Simple HelloWorld 64 bits application doesn't run in container


#1

Hi,

I am trying to create a docker image for an Windows 10 DOS x64 application currently build in Visual Studio 2017. Since it is my first time building an image I first tries a simple hello world problem.

What I did is :

Copy HelloVS2017App.exe into c:\MountVol
docker run -it --name microsw -v"c:\MountVol:c:\mount2" --rm microsoft/windowsservercore cmd

In the docker cmd shell:

cd mount2
HelloVS2017App.exe

The application returns without error but no message is printed. I tried also to create a file in the docker container but didn’t work either (no file created).

Last thing I tried it to package my application in a container image with the following docker file :

FROM microsoft/windowsservercore
COPY HelloVS2017App.exe .
WORKDIR .
CMD HelloVS2017App.exe

When I run the image I get the following :

D:\MyDoc\RMA Janvier 2019\Docker\NanoVs2017>docker run hello2017

D:\MyDoc\RMA Janvier 2019\Docker\NanoVs2017>docker -D run hello2017
time=“2019-01-26T14:14:02-05:00” level=debug msg="[hijack] End of stdout"

What am I missing?

Thanks,

M

Client: Docker Engine - Community
Version: 18.09.1
API version: 1.39
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:34:26 2019
OS/Arch: windows/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.24)
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:50:10 2019
OS/Arch: windows/amd64
Experimental: false


#2

Found the problem, which was a pretty basic one.

Some dlls dependencies were missing. Copy those in MountVol solve the problem (at least with WindowsServerCore, NanoServer still isn’t working).

Which there was some more detailed error though…

Thanks,

M