title: Volumes in the host system
body: <p>I can create a docker volume using a relative path:</p>
  <pre><code>version: '3'
  
  services:
    db:
      image: postgres
      environment:
        POSTGRES_PASSWORD: ${DB_PASS}
      volumes:
        - ./dbdata:/var/lib/postgresql/data
      ports:
        - '5432:5432'
  </code></pre>
  <p>Then, <code>dbdata</code> will be available on my <code>WSL 2</code>, and I will be able to enter it (with sudo su) and inspect its contents.</p>
  <p>Yet, when I run <code>docker volume ls</code>, I see only json below, which does not look like my dbdata volume at all:</p>
  <pre><code>[
      {
          &quot;CreatedAt&quot;: &quot;2020-11-03T09:19:37Z&quot;,
          &quot;Driver&quot;: &quot;local&quot;,
          &quot;Labels&quot;: null,
          &quot;Mountpoint&quot;: &quot;/var/lib/docker/volumes/5d668164c5bcdf4cc01e4c8fbc20cc1155f757d4ba06dc5118fa2d0a0b5efb9b/_data&quot;,
          &quot;Name&quot;: &quot;5d668164c5bcdf4cc01e4c8fbc20cc1155f757d4ba06dc5118fa2d0a0b5efb9b&quot;,
          &quot;Options&quot;: null,
          &quot;Scope&quot;: &quot;local&quot;
      }
  ]
  </code></pre>
  <p>But <a href="https://docs.docker.com/storage/" rel="nofollow noreferrer">here</a> I found this quote.</p>
  <blockquote>
  <p>When you create a volume, it is stored within a directory on the Docker host</p>
  </blockquote>
  <p>So my docker volumes should not be on my WSL 2 filesystem at all, they should reside on the <a href="https://docs.docker.com/get-started/overview/#docker-architecture" rel="nofollow noreferrer">Docker host instead</a>. Then why do I see my volumes inside WSL?</p>