Journal: Software Development

Email: mail@appsoftware.com

Software development notes and articles

A journal for sharing all things software development related


NuGet repositories in Docker containers

Mon, 12 Aug 2019 20:45 UTC

https://stackoverflow.com/questions/48821991/dockerfile-cant-see-local-file-or-private-nuget-server

In order for a dotnet command running inside a container to find your custom feeds, the nuget.config file must also be copied to the container.

To do this, add a nuget.config file with your private feed to your project folder and add an additional COPY step that copies this file to the container.

Example (Dockerfile):

WORKDIR ...
COPY NuGet.Config /
COPY ... ...

The information on this site is provided “AS IS” and without warranties of any kind either express or implied. To the fullest extent permissible pursuant to applicable laws, the author disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability, non-infringement and suitability for a particular purpose.