Why is it so hard to run a docker container in windows server 2016

Expected behavior

Docker Run command should run the container without any issue in windows server after installing docker with below commands

Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force
Force-Restart

Actual behavior

Able to install the docker in windows server 2016 standard successfully but when ever I run the container it is getting hung and not returning any log after that.

Examples:

PS Z:> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 7500fb3fd7cf 13 days ago 1.11GB
hello-world nanoserver 7500fb3fd7cf 13 days ago 1.11GB
microsoft/iis latest 6d91070fab75 2 weeks ago 10.8GB
microsoft/windowsservercore latest 8d57c0984795 2 weeks ago 10.5GB
microsoft/nanoserver latest 2bee0eeea2d3 2 weeks ago 1.11GB
microsoft/dotnet-samples dotnetapp-nanoserver e9ae30d43834 4 months ago 1.17GB

PS Z:> docker run -it -d microsoft/dotnet-samples:dotnetapp-nanoserver
c0bbece387279b5c068f5a9fe63fd177b81bdfb3c6755359093712d0b49cd752

No output after this… it gets hung

Information

Debug-ContainerHost.ps1 output:

Checking for common problems
Container Host OS Product Name: Windows Server 2016 Standard
Container Host OS Build Label: 14393.2125.amd64fre.rs1_release.180301-2139
Describing Windows Version and Prerequisites
[+] Is Windows 10 Anniversary Update or Windows Server 2016 691ms
[+] Has KB3192366, KB3194496, or later installed if running Windows build 14393 129ms
[+] Is not a build with blocking issues 19ms
[+] Has ‘Containers’ feature installed 7.71s
Describing Docker is installed
[+] A Docker service is installed - ‘Docker’ or ‘com.Docker.Service’ 76ms
[+] Service is running 25ms
[+] Docker.exe is in path 2.11s
[+] Docker is registered in the EventLog service 19ms
Describing User has permissions to use Docker daemon
[+] docker.exe should not return access denied 36ms
Describing Windows container settings are correct
[+] Do not have DisableVSmbOplock set to 1 29ms
[+] Do not have zz values set 45ms
[+] Do not have FDVDenyWriteAccess set to 1 18ms
Describing The right container base images are installed
[+] At least one of ‘microsoft/windowsservercore’ or ‘microsoft/nanoserver’ should be installed 165ms
Describing Container network is created
[+] At least one local container network is available 3.16s
[+] At least one NAT, Transparent, or L2Bridge Network exists 29ms
[+] NAT Network’s vSwitch is internal 19ms
[+] A Windows NAT is configured if a Docker NAT network exists 312ms
[+] Specified Network Gateway IP for NAT network is assigned to Host vNIC 54ms
[+] NAT Network’s internal prefix does not overlap with external IP’ 78ms
Showing output from: docker info
Containers: 45
Running: 0
Paused: 0
Stopped: 45
Images: 5
Server Version: 17.06.2-ee-7
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.2125.amd64fre.rs1_release.180301-2139)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 7.999GiB
Name: xxxxxxxxxxxxxxx
ID: EOZC:TF65:JD7P:S6SN:YPKL:BF4S:ECQE:RKU3:3xxxxxxxxxxxxxxxxxxxxxxx
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Http Proxy: httxxxxxxxxxxxxxxxxxxxxx
Https Proxy: httxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Showing output from: docker version
Client:
Version: 17.06.2-ee-7
API version: 1.30
Go version: go1.8.7
Git commit: 925df35
Built: Fri Mar 16 22:29:37 2018
OS/Arch: windows/amd64

Server:
Engine:
Version: 17.06.2-ee-7
API version: 1.30 (minimum version 1.24)
Go version: go1.8.7
Git commit: 925df35
Built: Fri Mar 16 22:39:05 2018
OS/Arch: windows/amd64
Experimental: false

Showing output from: docker network ls
NETWORK ID NAME DRIVER SCOPE
36b0268a67f5 nat nat local
e4a18641f054 none null local

Getting Warnings & errors in the Windows event logs from the last 24 hours

ProviderName: docker

TimeCreated Id LevelDisplayName Message


3/28/2018 9:14:04 AM 1 Warning [!] DON’T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF …
3/28/2018 9:14:04 AM 1 Error Force shutdown daemon
3/28/2018 9:13:38 AM 1 Warning [!] DON’T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF …
3/28/2018 9:13:37 AM 1 Error Force shutdown daemon

Daemon Log:

time=“2018-03-27T16:05:06.289816100-05:00” level=debug msg=“HCSShim::CreateContainer id=c0bbece387279b5c068f5a9fe63fd177b81bdfb3c6755359093712d0b49cd752 config={“SystemType”:“Container”,“Name”:“c0bbece387279b5c068f5a9fe63fd177b81bdfb3c6755359093712d0b49cd752”,“Owner”:“docker”,“IsDummy”:false,“VolumePath”:”\\?\Volume{5eab574a-31f2-11e8-9130-0050569d7abe}",“IgnoreFlushesDuringBoot”:true,“LayerFolderPath”:“C:\ProgramData\docker\windowsfilter\c0bbece387279b5c068f5a9fe63fd177b81bdfb3c6755359093712d0b49cd752”,“Layers”:[{“ID”:“01af109d-f13c-5315-9fe6-8ba5d5b42219”,“Path”:“C:\ProgramData\docker\windowsfilter\23adb9e6e8915263ba375b929846b697284d0d62a0f86abb4d9f5cd87d996935”},{“ID”:“c53ffdfd-b42a-5296-b5c0-6ddaa598573f”,“Path”:“C:\ProgramData\docker\windowsfilter\f8e2999ec07b43c1193c02d2b6c2d58190ddf7c8c5c50efbde82b4a9589701c5”},{“ID”:“6479a381-ce48-58f2-b5cc-d5f014820442”,“Path”:“C:\ProgramData\docker\windowsfilter\2e354cc7b7eeca5c2b8e115b9a6f570b542c5fab2d3c0a69ed227f65ddccad3b”},{“ID”:“f163fe2d-f540-5f87-9dad-d2305871706f”,“Path”:“C:\ProgramData\docker\windowsfilter\f99b594f2b9b0182145c83567e46f80d8a3cb097dfc01ce159b30597a6db428c”},{“ID”:“cc74a8b9-19f8-502b-aaf9-6736b2c8e46a”,“Path”:“C:\ProgramData\docker\windowsfilter\b72cc51cfdd7b89b011abe5ee0c1629af43c94f447cf1ab5513cdd5ade728b79”},{“ID”:“ce94355f-5ef1-5da3-bfbd-3f896b290876”,“Path”:“C:\ProgramData\docker\windowsfilter\bf7c5c4837de6c60a39241d52fd669a51e85d933c1a83984cb290b27eea58e07”},{“ID”:“2009e8ed-3d8f-51b9-bcf2-cd3e9260f4ef”,“Path”:“C:\ProgramData\docker\windowsfilter\87788f5b8d3fdabc18a31c30ce04013d3ce17a1efffcc5054e7a4a7e1eb42272”},{“ID”:“726249b6-96e9-56fb-ac9c-e2629e322b16”,“Path”:“C:\ProgramData\docker\windowsfilter\e6da7fa8ab24efc9b009975a751757554c6ff5ef4723b867f9ce521aafd2f20f”},{“ID”:“d7f85105-73aa-55f8-b9fb-2dcf5c2533cc”,“Path”:“C:\ProgramData\docker\windowsfilter\3ac78bc95f758a470ba777b2b7c302c30a923d2b1aa93a97094956ad5bff3b72”},{“ID”:“e2060c9d-e581-5ced-985f-074c654e1b53”,“Path”:“C:\ProgramData\docker\windowsfilter\42c2a2c581a88bfa9a0799523d4a0cfb900f83ef9fe6a911bd05c2359d7b9d77”},{“ID”:“fbcaa82c-4431-5dee-9d10-ca693ecd0b62”,“Path”:“C:\ProgramData\docker\windowsfilter\375051cfdfa541cd576c8309d33a59bd495ffe3ed992f1e3d74e1f1098166e3f”}],“HostName”:“c0bbece38727”,“MappedDirectories”:[],“HvPartition”:false,“EndpointList”:[“4c4942b9-ffc4-4856-926a-7a7ba1fd8aee”],“Servicing”:false,“AllowUnqualifiedDNSQuery”:true}"
time=“2018-03-27T16:05:06.984889200-05:00” level=debug msg=“HCSShim::CreateContainer succeeded id=c0bbece387279b5c068f5a9fe63fd177b81bdfb3c6755359093712d0b49cd752 handle=39975648”
time=“2018-03-27T16:05:06.984889200-05:00” level=debug msg=“libcontainerd: Create() id=c0bbece387279b5c068f5a9fe63fd177b81bdfb3c6755359093712d0b49cd752, Calling start()”
time=“2018-03-27T16:05:06.984889200-05:00” level=debug msg=“libcontainerd: starting container c0bbece387279b5c068f5a9fe63fd177b81bdfb3c6755359093712d0b49cd752”
time=“2018-03-27T16:05:06.984889200-05:00” level=debug msg=“HCSShim::Container::Start id=c0bbece387279b5c068f5a9fe63fd177b81bdfb3c6755359093712d0b49cd752”

Steps to reproduce the behavior

Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force
Force-Restart
docker run -it -d microsoft/dotnet-samples:dotnetapp-nanoserver