Server

#below line automatically creates the folder, mount the volumes and maps the ports.
docker run -d  -p 8080:80 -v F:/Apps/Docker/nuget/db:/var/www/db -v F:/Apps/Docker/nuget/packages:/var/www/packagefiles  -e NUGET_API_KEY=ee28314c-f7fe-2550-bd77-e09eda3d0119  sunside/simple-nuget-server
#If mapping directory meeting with errors, try using container directory directly inside of it to ensure running.

Then you get the local nuget server running at: http://localhost:8080
使用Docker 快速搭建nuget本地服务器,Hosting private nuget server using docker in seconds!

Client CLI using choco

choco install -y Nuget.CommandLine
# After nuget installation:
dotnet pack -c Release
nuget push -Source http://localhost:8080/ -ApiKey ee28314c-f7fe-2550-bd77-e09eda3d0119 ClassLibrary.1.0.0.nupkg
#If using dotnet core on Linux, just use below, haven't found a way to check whether a package exists on nuget server
dotnet nuget delete --source http://192.168.1.7:17071/ -k 3cdb9803-86f9-4750-9615-338f14f0c814 --non-interactive EP.${fragment} 1.0.0
dotnet nuget push --source http://192.168.1.7:17071/ -k 3cdb9803-86f9-4750-9615-338f14f0c814 EP.${fragment}.1.0.0.nupkg

Most often package is successfully pushed to server.
In visual studio, add http://localhost:8080 to nuget package source.
Then:
使用Docker 快速搭建nuget本地服务器,Hosting private nuget server using docker in seconds!
Package can be seen in nuget client gui.
Dont't forget to do the same to all its dependencies, and if other nuget packages referenced, remember to check the api.nuget.org source too.
使用Docker 快速搭建nuget本地服务器,Hosting private nuget server using docker in seconds!
Then add the package and build:
使用Docker 快速搭建nuget本地服务器,Hosting private nuget server using docker in seconds!

Below picture looks kind of encouraging!????)

使用Docker 快速搭建nuget本地服务器,Hosting private nuget server using docker in seconds!

相关文章:

  • 2022-02-18
  • 2022-12-23
  • 2022-02-06
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2021-05-09
  • 2022-01-12
猜你喜欢
  • 2021-09-22
  • 2021-09-23
  • 2022-02-04
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2021-09-24
相关资源
相似解决方案