title: Set volume to docker container from wsl from windows 10
body: <p>In my windows i installed docker and ubuntu 18.4 wsl.So after expose daemon on localhost, i can use windows daemon on ubuntu wsl.</p>
  
  <p>I created a directory's on drive d and i made a file into data directory like below:</p>
  
  <pre><code>PS D:\wsl\data&gt; dir
      Directory: D:\wsl\data
  Mode                LastWriteTime         Length Name
  ----                -------------         ------ ----
  -a----        8/31/2019   2:27 PM              0 New Text Document.txt
  PS D:\wsl\data&gt;
  </code></pre>
  
  <p>after that, i run a postgres container like below on wsl teminal:</p>
  
  <pre><code>$ docker run  --name=pg-docker3  -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=s123  -v /mnt/d/wsl/data:/var/lib/postgresql/data mdillon/postgis:11-alpine
  </code></pre>
  
  <p>After creating container i open container by bash :</p>
  
  <pre><code>$ docker exec -it pg-docker3 bash
  </code></pre>
  
  <p>This is data postgres directory:</p>
  
  <pre><code>bash-4.4# ls /var/lib/postgresql/data
  PG_VERSION            pg_commit_ts          pg_logical            pg_serial             pg_subtrans           pg_xact               postmaster.pid
  base                  pg_dynshmem           pg_multixact          pg_snapshots          pg_tblspc             postgresql.auto.conf
  data                  pg_hba.conf           pg_notify             pg_stat               pg_twophase           postgresql.conf
  global                pg_ident.conf         pg_replslot           pg_stat_tmp           pg_wal                postmaster.opts
  bash-4.4# 
  </code></pre>
  
  <p>as you can see <code>data</code> directory construct in location but when i listed thing's inside data directory i can see my text file that created in host machine !!!</p>
  
  <p>I created a directory inside data directory calld <code>kk</code>.</p>
  
  <pre><code>bash-4.4# ls /var/lib/postgresql/data
  PG_VERSION            pg_commit_ts          pg_logical            pg_serial             pg_subtrans           pg_xact               postmaster.pid
  base                  pg_dynshmem           pg_multixact          pg_snapshots          pg_tblspc             postgresql.auto.conf
  data                  pg_hba.conf           pg_notify             pg_stat               pg_twophase           postgresql.conf
  global                pg_ident.conf         pg_replslot           pg_stat_tmp           pg_wal                postmaster.opts
  bash-4.4# ls /var/lib/postgresql/data/data/
  kk
  bash-4.4#
  </code></pre>
  
  <p>But not create this directory inside host as you can see:</p>
  
  <pre><code>PS D:\wsl\data&gt; dir
  
      Directory: D:\wsl\data
  
  Mode                LastWriteTime         Length Name
  ----                -------------         ------ ----
  -a----        8/31/2019   2:27 PM              0 New Text Document.txt
  </code></pre>
  
  <p>Where is the <code>/var/lib/postgresql/data/data/</code> ? and why it not appeared in /mnt/d/wsl/data ?</p>