0

I am setting up a development environment in Docker. As part of that, I need to run a local NuGet server to host private NuGet packages. I've picket BaGet (https://loic-sharma.github.io/BaGet/) and set up a dockerfile, called from Docker-Compose. This all works.

However, I want to iterate through existing NuGet packages and load them to the server when it starts. This done by running a command like:

dotnet nuget push -s http://localhost:8000/v3/index.json Core.Common.1.0.0.nupkg -k NUGET-SERVER-API-KEY

There could be many of these files. How do I load them automatically when the server is started by Docker.

1 Answer 1

0

A simple loop over the list of files in the director should get you going:

for f in `ls *.nupkg`; do
  dotnet nuget push -s http://localhost:8000/v3/index.json $f -k NUGET-SERVER-API-KEY
done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .