title: How to restore nuget packages from network share in Linux Docker container
body: <p>I'm tring to build a .NET Core solution in a Docker container but cannot get the <code>dotnet restore</code> command to work. I need to use both a local network share (just a simple filesystem repository) as well as the official nuget repo.</p>
  
  <p>My nuget config looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;packageSources&gt;
      &lt;add key="Nuget Feed" value="https://api.nuget.org/v3/index.json" /&gt;
      &lt;add key="custom feed" value="//uvd-fs1.uvd.local/Install/UVPackages" /&gt;
    &lt;/packageSources&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I start the container using the command <code>docker run -it --rm -v "$pwd\:/sln" microsoft/aspnetcore-build:latest</code></p>
  
  <p>Then <code>cd sln</code> and <code>dotnet restore ./UVAudit.sln</code>.</p>
  
  <p>This produces the following error:</p>
  
  <pre><code>/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Failed to retrieve information about 'RavenDB.Client' from remote source '/uvd-fs1.uvd.local/Install/UVPackages'. [/sln/UVAudit.sln]
  </code></pre>
  
  <p>I would expect the RavenDB package to be restored from the official feed, but if I remove the custom package source from the nuget.config file, only the non-official packages cannot be resolved. This makes me think that the error message is a bit misleading. I would also think that the <code>/uvd-fs1.uvd.local/Install/UVPackages</code> part should in fact be <code>//uvd-fs1.uvd.local/Install/UVPackages</code>, but adding further slashes does nothing. Any ideas if I'm doing something wrong or this looks like a bug? I'm no Linux expert, so I might be missing some basic concept.</p>
  
  <p>I also tried changing the repository path to <code>smb://uvd-fs1.uvd.local/Install/UVPackages</code> which caused the error message to change to:</p>
  
  <pre><code>/usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error : Failed to verify the root directory of local source 'smb://uvd-fs1.uvd.local/Install/UVPackages'. [/sln/UVAudit.sln]
  /usr/share/dotnet/sdk/1.0.1/NuGet.targets(97,5): error :   smb://uvd-fs1.uvd.local/Install/UVPackages [/sln/UVAudit.sln]
  </code></pre>
  
  <p>I don't really know if this even makes sense to try, just one of the very limited clues provided by googling.</p>