用docker 教學如下

安裝 nexus
docker run -d -p 8081:8081 --name nexus sonatype/nexus3
 
設定nexus 資料夾後啟用nexus
$ docker volume create --name nexus-data
$ docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3

 

預設帳號/密碼: admin / admin123

 

設定可用APIKEY

 

NuGet API Key 連結取得

 
 
windows 批次 nupkg檔案擷取
--syncnuget.bat--
for /f "usebackq tokens=*" %%n in (`dir /b /s packages\*.nupkg`) do copy "%%n" D:\NugetRepository /y
 
dir /s /b > print.txt
 
 
推送nuget
dotnet nuget push xxxx.nupkg -k 802ea7c2-1509-343a-8c99-7945e13b0cbe -s http://localhost:8081/repository/nuget-hosted/
 

 

DOTNET CORE 指定Nexus Server拉取所需nupkg檔案做 build

dotnet restore -s http://localhost:8081/repository/nuget-hosted/

參考資料

 
docker volume create介紹

 

arrow
arrow
    全站熱搜

    45 發表在 痞客邦 留言(0) 人氣()