title: Memory allocation to docker containers after moving to WSL 2 in Windows
body: <p>I recently updated my Docker environment to run on <code>WSL 2</code> on Windows.</p>
  
  <p>For setting memory allocation limits on containers in previous versions, I had option in Docker Desktop GUI under <code>Settings-&gt;Resources-&gt;Advanced-&gt;Preferences</code> to adjust memory and CPU allocation.</p>
  
  <p>After WSL 2 integration, I am not able to find that option.
  <a href="https://i.stack.imgur.com/ZHGI3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZHGI3.png" alt="enter image description here"></a></p>
  
  <p>I assume I should run everything through my Linux distro from now on, so this is the solution I was able to find:</p>
  
  <pre><code>docker run -d -p 8081:80 --memory="256m" container_name
  </code></pre>
  
  <p>I dont want to have to set a flag each time when running a container. Is there a way to permanently set the memory allocation?</p>