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

后端 未结 18 2088
[愿得一人]
[愿得一人] 2020-12-12 22:07

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 power

相关标签:
18条回答
  • 2020-12-12 22:43

    Problem: Installed Docker Desktop. Got Out of Memory error upon starting with linux instance.

    Details: OS: Windows 10 Professional Host: Lenovo ThinkPad Carbon X1, 4GB RAM Docker Desktop: Version 2.1.0.1 (37199) Docker advanced settings:

    • CPUs: 2
    • Memory: 2048MB (this is the maximum)
    • Swap: 2048MB
    • Disk Image Size: 59.6GB (4MB used)

    Hyper-V settings for DockerDesktopVM:

    • Settings > Memory > RAM: 2048MB (tried to increase to 4096; still doesn't work)
    • Settings > Memory > Enable Dynamic Memory (checked/un-checked; both doesn't work)

    Under variations of the above settings, Docker Desktop gives this error when starting/ re-starting:

    Not enough memory to start Docker Desktop You are trying to start Docker Desktop but you don't have enough memory. Free some memory or change your settings.

    The problem resolutions reported in the following links, e.g. starting with Windows instance, then switching back to Linux, don't work for me, regardless of how much memory I allocate via Hyper-V or Docker settings.

    It is utterly frustrating because apparently people are reporting being able to start with linux instances on host machines with 4GB of RAM. So I wonder what I am doing wrong.

    Resources researched/ tried:

    • https://forums.docker.com/t/not-enough-memory-to-start-docker/13512/24
    • Docker won't start on Windows: Not Enough memory to start docker

    Questions:

    1. Can I even run Docker Desktop with linux instance on my host machine?
    2. If (1) is yes, then what settings will allow me to do this?
    0 讨论(0)
  • 2020-12-12 22:46

    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!

    0 讨论(0)
  • 2020-12-12 22:48

    My Windows 10 Laptop has 8 GB of RAM. I also use virtual memory. When i start my OS and immediately run some RAM hungry applications, I can't start Docker until i stop most of the applications.

    Yet: https://stackoverflow.com/a/45816385/7082956 helped me as well.

    0 讨论(0)
  • 2020-12-12 22:51

    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.

    0 讨论(0)
  • 2020-12-12 22:53

    Issue resolved after just restarting the PC -_-. Dont know what is that.

    0 讨论(0)
  • 2020-12-12 22:54

    I have faced same issue: Docker out of memory in windows.

    I have solved issue, by following three steps.

    1. Quit Docker Desktop by clicking mouse right button. 2. Now run Docker Desktop as Administrator. 3. Now restart your windows system.

    Now Docker will work properly. This solution has worked for me. :)

    0 讨论(0)
提交回复
热议问题