Docker Run command hangs without any error

29.5k views Asked by At

I have been working with docker in Windows Server 2016 only for the last two weeks. I am trying to run a html file using

microsoft/windowsservercore (docker image)

After I execute the command

docker run -it --name CoreServerCMD microsoft/windowsservercore cmd.exe

the execution hangs and do not return.

please help this is image reference:

Error

3

There are 3 answers

4
Hugo Briand On BEST ANSWER

This is not an error: the docker image is being downloaded from the docker hub. According to https://hub.docker.com/r/microsoft/windowsservercore/tags/ the image is 5GB large, so this is a long time to download. I suggest that you wait at least an hour, depending on your broadband.

Update after feedback: it seems this is not precisely the issue the author encountered - the provided answer works for other OS than Windows. See comments for more details.

0
Avik Aggarwal On

You are running the 'docker run' command with '-it' flag. You need to include '-d' flag instead of '-it'.

1
Faizan Mubasher On

Adding to Avik Aggarwal answer, even with -d flag didn't work for me. Increasing Docker's RAM (resources) in Settings solved the problem.