Learn Docker With My Newest Course

Dive into Docker takes you from "What is Docker?" to confidently applying Docker to your own projects. It's packed with best practices and examples. Start Learning Docker →

Docker Tip #84: Fixing Obscure Docker Desktop Daemon Errors

docker-tips-and-tricks.jpg

If you're getting errors that you can't explain or you're getting different types of errors with the same code you might be out of memory.

A while back, we covered 3 ways to troubleshoot volumes not working with Docker for Windows in Docker Tip #72 but this tip applies to anyone using Docker Desktop (formerly known as Docker for Windows or Docker for Mac).

This tip is titled “obscure errors” because there is no single error that might be thrown due to running out of memory. When a system goes out of memory, often times unpredictable things will happen.

But in the Docker Desktop case you’ll likely start getting various Docker daemon errors.

Fortunately the fix is very easy. Just head over to your advanced Docker Desktop settings and add more memory:

docker-desktop-advanced-engine-settings.jpg

In the above case I changed mine from 2GB of memory to 4GB and I haven’t run into any issues since then.

Keep in mind, you may need to raise yours if your Dockerized application is very memory hungry. In my case I had to load in a lot of data into PostgreSQL and before doing this the container would either hang forever or I’d eventually get various Docker daemon errors.

Free Intro to Docker Email Course

Over 5 days you'll get 1 email per day that includes video and text from the premium Dive Into Docker course. By the end of the 5 days you'll have hands on experience using Docker to serve a website.



Comments