我正在使用mcr.microsoft.com/dotnet/core/sdk:3.0-buster
镜像构建一个docker镜像,但我需要添加Telerick nuget提要源。我可以传入一个nuget.config
文件,它将会工作,所以当dotnet restore
操作运行时,我知道nuget本身正在工作。
Nuget肯定在图像中的某个地方,但显然不在路径中。因此,当我尝试在Dockerfile中运行此命令时:
RUN nuget.exe sources add -Name telerik -Source https://nuget.telerik.com/nuget/ -username myusername -password mypassword
我得到了错误:
/bin/sh: 1: nuget.exe: not found
nuget.exe在dotnet核心docker镜像中的什么位置?
发布于 2019-11-02 04:25:26
SDK本身并不包含在.NET核心nuget
中。
.NET核心软件开发工具包内置了nuget
功能的一个子集。对于其他功能,您必须回退到变通方法。
Telerik docs point out that you have to put your configuration in the Nuget.config
file in .NET Core。
https://stackoverflow.com/questions/58664872
复制相似问题