title: Dockerfile can't see local file or private nuget server
body: <p>I am trying to start my .net core web api on container tech. using docker.</p>
  
  <p>Environments=Windows 10,Visual Studio</p>
  
  <p>Docker version:</p>
  
  <blockquote>
    <p>Client:</p>
    
    <p>Version:       17.12.0-ce</p>
    
    <p>API version:   1.35</p>
    
    <p>Go version:    go1.9.2</p>
    
    <p>Git commit:    c97c6d6</p>
    
    <p>Built: Wed Dec 27 20:05:22 2017</p>
    
    <p>OS/Arch:       windows/amd64</p>
    
    <p>Server:</p>
    
    <p>Engine:</p>
    
    <p>Version:      17.12.0-ce</p>
    
    <p>API version:  1.35 (minimum version 1.12)</p>
    
    <p>Go version:   go1.9.2</p>
    
    <p>Git commit:   c97c6d6</p>
    
    <p>Built:        Wed Dec 27 20:12:29 2017</p>
    
    <p>OS/Arch:      linux/amd64</p>
    
    <p>Experimental: true</p>
  </blockquote>
  
  <p>My Nuget.Config file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
  &lt;packageSources&gt;
  
  
  &lt;add key="nuget.org" value="https://api.nuget.org/v3/index.json" 
  protocolVersion="3" /&gt;
  
  
  &lt;add key="Private" 
  value="http://My_Private_Nuget_Server" /&gt;
  
  
  &lt;/packageSources&gt;
  &lt;packageRestore&gt;
  &lt;add key="enabled" value="True" /&gt;
  &lt;add key="automatic" value="True" /&gt;
  &lt;/packageRestore&gt;
  &lt;bindingRedirects&gt;
  &lt;add key="skip" value="False" /&gt;
  &lt;/bindingRedirects&gt;
  &lt;packageManagement&gt;
  &lt;add key="format" value="0" /&gt;
  &lt;add key="disabled" value="True" /&gt;
  &lt;/packageManagement&gt;
  
  
  &lt;apikeys&gt;
  &lt;add key="https://www.nuget.org" value="Some_Long_Value" /&gt;
  &lt;/apikeys&gt;
  
  
  &lt;disabledPackageSources /&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>My Dockerfile:</p>
  
  <pre><code>FROM microsoft/aspnetcore-build:2.0 AS build-env
  WORKDIR /app
  
  # Copy csproj and restore as distinct layers
  COPY *.csproj ./
  RUN dotnet restore
  
  # Copy everything else and build
  COPY . ./
  RUN dotnet publish -c Release -o out
  
  # Build runtime image
  FROM microsoft/aspnetcore:2.0
  WORKDIR /app
  COPY --from=build-env /app/out .
  ENTRYPOINT ["dotnet", "MailAlertWebApiWithEF.dll"]
  </code></pre>
  
  <p>I' am using Linux Container on windows 10 machine. I have .net core project on Visual Studio 17. When ı add docker support and run from VS 17 everything works fine. API stands up inside a container.But don't work when i close the VS. However When ı try to customize my dockerfile to make my image and container independent from VS. It gives error because of a private <code>.dll</code>.</p>
  
  <p>In my project ı have a .<code>dll</code>  from my private nuget server. When ı tried without my private <code>.dll</code> ı can create image. But ı need that <code>.dll</code>. Docker give me this error:</p>
  
  <blockquote>
    <p>MailAlertWebApiWithEF.csproj : error NU1101: Unable to find package
    WebApi.Utils. No packages exist with this id in source(s):
    nuget.org</p>
  </blockquote>
  
  <p>I searched this error. The source of problem seems like Nuget.Config file. But it seems good to me because i can see me private nuget server in there. When ı searched the solutions arrows always on linux machines but ı use windows.</p>
  
  <p>1-)So if i can start  my project with VS 17 , then my nuget.config file is in correct form. It can see my private nuget server. Right? Then why not docker don't see it?</p>
  
  <p>Please help </p>