简体   繁体   中英

Running simple exe into a docker container running microsoft/windowsservercore

I would like to run a simple application displaying a "Hello World" in a Docker container running under an images microsoft/windowsservercore.

-> I copy my executable into a container and then I commit my container to save the state. -> I launched my container and launched my executable.

Problem I have no output.

C:\>docker version
Client:
Version:      18.03.1-ce
API version:  1.37
Go version:   go1.9.5
Git commit:   9ee9f40
Built:        Thu Apr 26 07:12:48 2018
OS/Arch:      windows/amd64
Experimental: false
Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.24)
  Go version:   go1.9.5
  Git commit:   9ee9f40
  Built:        Thu Apr 26 07:21:42 2018
  OS/Arch:      windows/amd64
 Experimental: false

Hello world code source

#include <iostream>

int main()
{
 std::cout << "Hello World " << "!\n";
}

The executable perfectly runs on a Windows machine.

The problem is that basic dlls are missing, you can refer: https://github.com/docker/for-win/issues/700

You can also try microsoft/aspnetcore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM