title: How to use local nuget package sources for Dockerfile dotnet restore
body: <p>I'm trying to make use of local nuget package for my dotnet restore, I tried to follow this tutorial: <a href="https://blog.bigfont.ca/dotnet-restore-without-an-internet-connection/" rel="noreferrer">dotnet restore w/out internet</a> </p>
  
  <p><strong>My problem:</strong></p>
  
  <p>It doesn't see the path even though it exist on that path.<img src="https://i.stack.imgur.com/uAIih.jpg" alt="click for image">. </p>
  
  <p>The server I'm using is on a Corporate Network that is why I can't use dotnet restore, so I'm also experiencing the problem with nuget.org similar to this <a href="https://stackoverflow.com/questions/46435320/dotnet-restore-works-locally-but-fails-when-building-docker-container">link</a>.</p>
  
  <p><strong>Environment:</strong></p>
  
  <p>For the sample project, I used:</p>
  
  <ul>
  <li>the basic .Net Core web app from Visual Studio 2017</li>
  <li>Docker Enterprise Edition(no UI), Windows container</li>
  <li>Windows Server 2016 as OS.</li>
  </ul>
  
  <h2><strong>UPDATE 10/15/2018</strong></h2>
  
  <p>While the answer of @omajid has been very helpful, I believe docker volume mount is only possible when using docker run and can't be used in Dockerfile(which will be used for Build Pipeline). Got this link which is similar to what I want to achieve. <a href="https://stackoverflow.com/questions/23439126/how-to-mount-a-host-directory-in-a-docker-container">How to mount a host directory in a Docker container</a></p>