Docker Community Forums

Share and learn in the Docker community.

Hello-world stalls

docker

(Peilonrayz) #1

Expected behavior

Install Docker EE:

PS C:\Windows\system32> docker container run hello-world:nanoserver
Unable to find image 'hello-world:nanoserver' locally
nanoserver: Pulling from library/hello-world
bce2fbc256ea: Pull complete
5b557cd80a98: Pull complete
d3552d0cd5f6: Pull complete
37a59aef7ded: Pull complete
Digest: sha256:a8927793c52fd83b93450f73d0aa521a6e3c8398b9147297192980cc6fd51465
Status: Downloaded newer image for hello-world:nanoserver

Hello from Docker!
This message shows that your installation appears to be working correctly.
<snip>
PS C:\Windows\system32>

Test Docker installation:

PS C:\Windows\system32> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
Digest: sha256:97ce6fa4b6cdc0790cda65fe7290b74cfebd9fa0c9b8c38e979330d547d22ce1
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
...
PS C:\Windows\system32>
PS C:\Windows\system32> docker run -d hello-world
ecce429b85456f7302d430a51c059974426031a82634084ec2db47462d22e007
PS C:\Windows\system32>

Actual behavior

Install Docker EE:

PS C:\Windows\system32> docker container run hello-world:nanoserver
Unable to find image 'hello-world:nanoserver' locally
nanoserver: Pulling from library/hello-world
bce2fbc256ea: Pull complete
5b557cd80a98: Pull complete
d3552d0cd5f6: Pull complete
37a59aef7ded: Pull complete
Digest: sha256:a8927793c52fd83b93450f73d0aa521a6e3c8398b9147297192980cc6fd51465
Status: Downloaded newer image for hello-world:nanoserver

Test Docker installation:

PS C:\Windows\system32> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
Digest: sha256:97ce6fa4b6cdc0790cda65fe7290b74cfebd9fa0c9b8c38e979330d547d22ce1
Status: Downloaded newer image for hello-world:latest
PS C:\Windows\system32> docker run -d hello-world
ecce429b85456f7302d430a51c059974426031a82634084ec2db47462d22e007

Information

Firstly the missing PS prompt is so that it’s clear the process never ends. In none of the examples above did the process end within a couple of hours.

All I did was follow Install Docker EE as outlined below.

Output from DockerDebugInfo.ps1. My admin account is a-jew, I was born with unfortunate initials.

Steps to reproduce the behavior

  1. Install Windows Server 2016 Standard (1607), with all updates.

  2. Follow Install Docker EE instructions:

    PS C:\Windows\system32> Install-Module DockerMsftProvider -Force
    
    NuGet provider is required to continue
    PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or 'C:\Users\a-jew\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the NuGet provider now?
    [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
    PS C:\Windows\system32> Install-Package Docker -ProviderName DockerMsftProvider -Force
    WARNING: A restart is required to enable the containers feature. Please restart your machine.
    
    Name                           Version          Source           Summary
    ----                           -------          ------           -------
    Docker                         17.06.2-ee-7     DockerDefault    Contains Docker EE for use with Windows Server.
    
    
    PS C:\Windows\system32> Restart-Computer -Force
    PS C:\Windows\system32> docker container run hello-world:nanoserver
    C:\Program Files\Docker\docker.exe: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.30/containers/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
    See 'C:\Program Files\Docker\docker.exe run --help'.
    PS C:\Windows\system32> Start-Service docker
    PS C:\Windows\system32> docker container run hello-world:nanoserver
    Unable to find image 'hello-world:nanoserver' locally
    nanoserver: Pulling from library/hello-world
    bce2fbc256ea: Pull complete
    5b557cd80a98: Pull complete
    d3552d0cd5f6: Pull complete
    37a59aef7ded: Pull complete
    Digest: sha256:a8927793c52fd83b93450f73d0aa521a6e3c8398b9147297192980cc6fd51465
    Status: Downloaded newer image for hello-world:nanoserver
    

(Artisticcheese) #2

Run docker service in console with docker -D and see if any errors thrown in output


(Peilonrayz) #3

Unfortunately running in debug mode also dose the same thing.

PS> docker -D run hello-world

(Artisticcheese) #4

Sorry I mean running docker service itself in debug mode dockerd.exe -D
Find a service called “Docker Engine”, stop it, open new command prompt and run dockerd -D


(Peilonrayz) #5

Ok, I stopped the service with Stop-Service docker. And I got the output. This has:

  • startup.txt where the server starts up.
  • run.txt is after startup.txt, and is when I ran docker run hello-world.

(Artisticcheese) #6

This seems to be ok to my inexperienced eye. Did you try to run just plain vanilla nanoserver container instead?
Try both (not sure which version of Windows you have)

docker run -it --rm microsoft/nanoserver:1709 cmd /c set computername
and
docker run -it --rm microsoft/nanoserver cmd /c set computername


(Peilonrayz) #7

I ran the second as I’m running 1607, not 1709. Which lead to the same thing:

PS C:\Windows\system32> docker run -it --rm microsoft/nanoserver cmd /c set computername
Unable to find image 'microsoft/nanoserver:latest' locally
latest: Pulling from microsoft/nanoserver
bce2fbc256ea: Already exists
5b557cd80a98: Already exists
Digest: sha256:204c41542c0927ac0296802e44c56b886b47e99cf8220fb49d46951bd5fc1742
Status: Downloaded newer image for microsoft/nanoserver:latest

I also updated the gist with the output.


(Artisticcheese) #8

Try to run with --isolation=process
Looks like you are running inside VMware with Hyper-V enabled and possible issue is that docker tries to run with Hyper-V by default and fails.


(Peilonrayz) #9

You’re correct, that’s the way I am running it. I didn’t think that it would have effected it. :sweat_smile:
Unfortunately that also has the same problem of stalling.

PS C:\Windows\system32> docker run --isolation=process hello-world

I’ve included the output into the gist again.
Thank you, I now have a problem I can now look into as well. :smiley: