Docker won't start on Windows: Not Enough memory to start docker

65,042

Solution 1

I have also encountered the same problem. Tried everything from giving dynamic memory to enabling and disabling Hyper V and many more. But with all that, I got no success.

Then I tried these steps for

Docker won't start on Windows: Not Enough memory to start docker:

1) From System Tray menu, right click on Docker icon

2) Select Switch to Windows containers...

3) Restart the system.

There you go after restarting your docker status should be showing as: Docker is running

Hope this helps!

PS: Switching back to Linux container should work now after switching to Windows Containers for most of the users as said by rfay.


Updates (May 01, 2019)

Despite of the above methods if you're still unable to start docker on your Windows Machine, try with the following things:

  • Download RAMMap from Microsoft's Official website
  • Open the application and select Empty menu
  • From the sub-menu list select the first option Empty Working Sets
  • Now refresh it by pressing F5

Now try running docker and I believe this should work. Good Luck!

RAMMap Application

Solution 2

I solved this issue by right clicking on the docker tray icon chose settings and then tapped on the "Advanced" section.

Then I lowered the memory from the default 2048 to 1536 and works like charm. Another option is try to switch to Windows Containers then Restart the Machine and switch back to Linux Containers.

Below is my docker settings with Advanced tab open. Note the Memory is 1536 and My laptop has 4GB Ram.

enter image description here

Also the virtual machine "MobyLinuxVM" is running as shown below;

enter image description here

I hope this helps someone one day even if was a late answer :)

Solution 3

if you are on window and got this error, Go to Search box

#1 type Hyper-V Manager 
 Click on it,
 a window like attached screenshot open,

enter image description here

#2 Select  MobilinuxVM(normally same name if running windows docker)
#3 Right click and open - Setting 
    2 The second window will open(setting for MobiLinux) i.e to the screenshot.
#4 Go to Memory Tab in left Pane.
#5 click on a dynamic checkbox and set minimum value to some lower amount say 512, and max value to the desired one,
#6 apply 
now it will start running as well after few minutes take the amount it required as well.

Solution 4

It is not the problem of RAM. It is the allocated disk memory to docker.
It means there is not enough space for docker to create an image or any other docker related operations.

Open the docker settings >> advanced >> disk image max size

Increase this size and apply the changes.

It will restart automatically and then you're good to go.

enter image description here

Solution 5

In Settings, I did a reset to factory defaults. And restarted the laptop. It Worked for me

Share:
65,042
George Edwards
Author by

George Edwards

Updated on December 05, 2020

Comments

  • George Edwards
    George Edwards over 3 years

    I am trying to get started with Docker on Windows. My machine has 4GB of RAM and a 1.9GHz - 2.5GHz Intel i5 processor, running Windows 10 Pro x64. I know these aren't powerful specs, but I would have thought I should be able to run Docker?

    However, having downloaded Docker, I get the error message:

    Not Enough memory to start docker

    I have seen various forum posts and github issues about this and followed all the advice I can see, such as modifying the settings in Docker, I tried these:

    enter image description here

    They also mentioned changing the settings of the Hyper-V VM however, this seems to be deleted and recreated with the Docker specified settings on every attempted launch. I tried 2048MB, 1792MB, 1536MB, 1280MB and 1024MB of RAM, all of which failed.

    What else can I do? Surely I can run docker in some form on my machine? NB: I have closed all non-essential background apps. There doesn't seem to be many other suggestions for what seems to be a fairly common issue, where the given solutions don't work?

  • John Detlefs
    John Detlefs over 6 years
    This worked for me, after trying everything I could think of.. ta!
  • Allex Ferra
    Allex Ferra about 6 years
    Thanks @Dmitry for Edit
  • rfay
    rfay about 6 years
    So switching to windows containers means that you can't run Linux containers any more, which is what most people are running. However, when I had this problem, switching to Windows containers and then switching back to Linux containers did the job.
  • Ryall
    Ryall almost 6 years
    Doesn't work because Docker just overrides the settings next time it boots
  • cha
    cha almost 6 years
    There was windows 10 update. System was updated correctly. But docker failed to start. This memory issue happens. After doing reset to factory defaults, it worked to me. Thanks
  • AHL
    AHL over 4 years
    It doesn't work for me. The specs of my host machine is almost identical to the original post in this thread. I have been trying nearly all of the proposed fixes reported here but to no avail.
  • Ekown
    Ekown over 4 years
    Hmm, it worked for me as I was running Linux containers first but I'm curious as to why is this happening.
  • Kersy
    Kersy about 4 years
    This worked flawlessly and so well. Should be marked as a right answer
  • rbashish
    rbashish about 4 years
    @Kersy If you find any answers on stackoverflow useful then do not forget to upvote the answer. This means a lot to person answering the question.
  • Balaji
    Balaji almost 4 years
    after hours this did it. simple and elegant solution
  • Unicornese
    Unicornese over 3 years
    this worked for me. This was really driving me nuts.
  • Michael Freidgeim
    Michael Freidgeim almost 3 years
    You should not put question as an answer.