<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Wsl2 on despatches</title><link>https://icle.es/tags/wsl2/</link><description>Recent content in Wsl2 on despatches</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 20 Jun 2025 09:25:00 +0100</lastBuildDate><atom:link href="https://icle.es/tags/wsl2/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting Docker Desktop Working with WSL2 on Windows</title><link>https://icle.es/2020/05/28/getting-docker-desktop-working-with-wsl2-on-windows/</link><pubDate>Thu, 28 May 2020 17:29:52 +0000</pubDate><guid>https://icle.es/2020/05/28/getting-docker-desktop-working-with-wsl2-on-windows/</guid><description>&lt;p>I ran into several issues while trying to get this to work. Here are the steps I
had to complete to get it working. Hopefully this will save some hair on your
head ;)&lt;/p>
&lt;p>The main step is to go into the settings in Docker Desktop -&amp;gt; Resources and
make sure that your distribution is enabled for docker.&lt;/p>
&lt;p>
 &lt;img src="https://icle.es/assets/2020/05/image.png" alt="enable your distro on docker">

&lt;/p>
&lt;ol>
&lt;li>Make sure that you have no docker packages installed on your WSL
distribution. Docker Desktop will deploy its own binaries, and any
pre-existing binaries will confuse it. This issue exhibited itself for me
with errors related to missing files around credentials.&lt;/li>
&lt;li>Remove any &lt;code>DOCKER_HOST &lt;/code>environment variables. Docker Desktop will sort it
out. Docker kept hanging for me until I fixed this.&lt;/li>
&lt;li>If you want to use docker as non-root user, add yourself to the
&lt;code>docker &lt;/code>group.&lt;/li>
&lt;/ol>
&lt;p>Errors / Issues I ran into:&lt;/p></description><content:encoded><![CDATA[<p>I ran into several issues while trying to get this to work. Here are the steps I
had to complete to get it working. Hopefully this will save some hair on your
head ;)</p>
<p>The main step is to go into the settings in Docker Desktop -&gt; Resources and
make sure that your distribution is enabled for docker.</p>
<p>
  <img src="/assets/2020/05/image.png" alt="enable your distro on docker">

</p>
<ol>
<li>Make sure that you have no docker packages installed on your WSL
distribution. Docker Desktop will deploy its own binaries, and any
pre-existing binaries will confuse it. This issue exhibited itself for me
with errors related to missing files around credentials.</li>
<li>Remove any <code>DOCKER_HOST </code>environment variables. Docker Desktop will sort it
out. Docker kept hanging for me until I fixed this.</li>
<li>If you want to use docker as non-root user, add yourself to the
<code>docker </code>group.</li>
</ol>
<p>Errors / Issues I ran into:</p>
<p><code>docker.credentials.errors.InitializationError: docker-credential-desktop.exe not installed or not available in PATH</code> -
Fixed by 1 above.</p>
<p><code>docker-compose</code> from WSL2 errors out - Again, fixed by 1</p>
<p>Unable to run <code>docker</code> as non-root user - fixed by 3.</p>
<p>Docker hangs when run as non-root user - fixed by 2.</p>
]]></content:encoded></item></channel></rss>