Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 645
George Edwards Avatar asked Apr 02 '17 15:04

George Edwards


People also ask

How do I allocate more memory to Docker windows?

To limit the maximum amount of memory usage for a container, add the --memory option to the docker run command. Alternatively, you can use the shortcut -m . Within the command, specify how much memory you want to dedicate to that specific container.

How much RAM do I need for Docker desktop?

Minimum requirements: OS: macOS 10.15 or newer (Montery, Big Sur, Catalina) Memory: 4 GB RAM.

Why is my Docker not starting?

Go to performance and then CPU to verify whether Virtualization is enabled or not. If virtualization is disabled Docker Desktop cannot start. If the virtualization is disabled in your machine then you need to enable it from BIOS Settings.

How do I change my Docker desktop memory limit?

Right click on the Docker whale in the system tray and choose "Settings" Go to "Resources -> Advanced" on the left. Set how many CPUs and memory is available to containers here.


2 Answers

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

like image 103
rbashish Avatar answered Sep 29 '22 15:09

rbashish


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 :)

like image 24
STREET MONEY Avatar answered Sep 29 '22 17:09

STREET MONEY