Docker Run command hangs without any error

18,218

Solution 1

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.

Solution 2

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

Solution 3

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

Share:
18,218

Related videos on Youtube

Yogesh H Shenoy
Author by

Yogesh H Shenoy

Challenges you face define your capacity ~ unknown

Updated on June 19, 2022

Comments

  • Yogesh H Shenoy
    Yogesh H Shenoy almost 2 years

    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

  • gesellix
    gesellix over 6 years
    Looking at the provided Screenshot (at the Error link), the image is already downloaded.
  • Yogesh H Shenoy
    Yogesh H Shenoy over 6 years
    Yes the image is already downloaded and it is listing in my local repository. I can see it with the command "docker images".
  • Michael Mallett
    Michael Mallett about 6 years
    This is not the correct answer. The docker image is already downloaded, having the same problem with nginx (which is not large at all).
  • Roberto Andrade
    Roberto Andrade over 5 years
    Same issue here, I made sure to pull the image first before issuing the docker run command, it's stuck trying to run it as well.