title: Why in docker-compose I should write full path to volume?
body: <p>I have some confusing moments with docker-compose volumes (In docker windows server (container)).
  I wrote the next configuration</p>
  
  <pre><code>volumes:
    - "C:/ProgramData/Docker/volumes/admin-stat-logs:C:/app/Logs"
  </code></pre>
  
  <p>and why it so necessary to write the full path to the volume?</p>
  
  <p>if I write:</p>
  
  <pre><code>volumes:
    - "admin-logs:C:/app/Logs"
  </code></pre>
  
  <p>it generates the error
  ERROR: Named volume "admin-logs:C:/app/Logs:rw" is used in service "admin-stat-table" but no declaration was found in the volumes section.</p>
  
  <p>why does it happen?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>let me show what I mean(I made wrong explonation). In an image, we have a short announcement from the official documentation.</p>
  
  <p><a href="https://i.stack.imgur.com/L7tWI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L7tWI.png" alt="enter image description here"></a></p>
  
  <p>I write the same in my case:</p>
  
  <pre><code>volumes:
    - admin-logs:C:/app/Logs
  </code></pre>
  
  <p>I create volume before by the terminal. When I start docker-compose up I get the next error</p>
  
  <blockquote>
    <p><strong>ERROR: Named volume "admin-stat-logs:C:/app/Logs:rw" is used in service "admin-stat-table" but no declaration was found in the volumes section.</strong></p>
  </blockquote>
  
  <p>I made a mistake in the first case, it's a simple mount to a folder, sorry for my misunderstanding.</p>
  
  <pre><code>volumes:
    - "C:/ProgramData/Docker/volumes/admin-stat-logs:C:/app/Logs"
  </code></pre>