How to Limit Memory and Resources in Docker Desktop on Windows

Vhspiceros
Apr 11, 2024

--

I’m working with Docker Desktop on Windows as part of my daily routine, primarily for database engines such as PostgreSQL and Oracle.

Since I use my computer intensively, with numerous browser tabs open and running multiple instances of Visual Studio 2022 and SQL Server, I needed to limit the resources of my computer.

To limit the RAM, CPU, and other resources in Windows, it’s necessary to create a file named .wslconfig in your home directory.

[wsl2]
memory = 4GB # Limits VM memory in WSL 2

Before

After

Originally published at http://vhspiceros.blogspot.com on April 11, 2024.

--

--

Responses (1)