<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Filimon</title>
    <description>The latest articles on DEV Community by Daniel Filimon (@danifilimon).</description>
    <link>https://dev.to/danifilimon</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F974752%2Fb801fe66-2662-4187-8747-3e1bc9f0261d.jpeg</url>
      <title>DEV Community: Daniel Filimon</title>
      <link>https://dev.to/danifilimon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danifilimon"/>
    <language>en</language>
    <item>
      <title>How to run podman rootless in WSL</title>
      <dc:creator>Daniel Filimon</dc:creator>
      <pubDate>Fri, 18 Nov 2022 07:29:45 +0000</pubDate>
      <link>https://dev.to/danifilimon/how-to-run-podman-rootless-in-wsl-3p1p</link>
      <guid>https://dev.to/danifilimon/how-to-run-podman-rootless-in-wsl-3p1p</guid>
      <description>&lt;h4&gt;
  
  
  TL;DR &lt;code&gt;sudo mount --make-rshared /&lt;/code&gt;
&lt;/h4&gt;




&lt;p&gt;If you're anything like me and you're trying to use podman inside WSL, you may get the following issue when running any podman command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ podman ps
WARN[0000] "/" is not a shared mount, this could cause issues or missing mounts with rootless containers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what can you do? Run every podman command with &lt;code&gt;sudo&lt;/code&gt;?&lt;br&gt;
That's not an option.&lt;/p&gt;

&lt;p&gt;Thankfully, there's an easy fix on WSL. First, to diagnose the problem, run &lt;code&gt;findmnt -o PROPAGATION&lt;/code&gt;. You'll probably get an output like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ findmnt -o PROPAGATION
PROPAGATION
private
shared
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
private
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So podman is complaining about the &lt;code&gt;/&lt;/code&gt; mount not being shared, for which there is an easy fix: &lt;code&gt;sudo mount --make-rshared /&lt;/code&gt;.&lt;br&gt;
Then, if you run &lt;code&gt;findmnt -o PROPAGATION&lt;/code&gt; again you'll notice the change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ findmnt -o PROPAGATION
PROPAGATION
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
shared
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, &lt;code&gt;podman ps&lt;/code&gt; now works properly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ podman ps
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yay!&lt;/p&gt;

</description>
      <category>podman</category>
      <category>wsl</category>
      <category>containers</category>
    </item>
  </channel>
</rss>
