简体   繁体   English

NuGet with Docket无法加载源的服务索引

[英]NuGet with Docket Unable to load the service index for source

Running docker build command in PowerShell and getting: 在PowerShell中运行docker build命令并获取:

Unable to load the service index for source 无法加载源的服务索引

I've litterly tried all the solutions provided here: Nuget connection attempt failed "Unable to load the service index for source" and here: https://github.com/NuGet/Home/issues/5358 . 我乱丢杂乱地尝试了这里提供的所有解决方案: Nuget连接尝试失败“无法加载源的服务索引”,并且这里: https : //github.com/NuGet/Home/issues/5358 I don't have any problems with visual studio 2017 on nuget restore packages. 我在nuget恢复包上使用Visual Studio 2017没有任何问题。

I'm not behind a proxy or anything. 我没有代理人或任何东西。 I'm able to see json output if I browse to: https://api.nuget.org/v3/index.json 如果浏览到以下网址,则可以看到json输出: https : //api.nuget.org/v3/index.json

C#

my NuGet.Config in (AppData): 我在(AppData)中的NuGet.Config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <packageManagement>
    <add key="format" value="0" />
    <add key="disabled" value="False" />
  </packageManagement>
</configuration>

Why does docker fail? 为什么Docker会失败?

After counless hours trying to figure this out this fix worked for me: 经过无数小时的尝试来找出答案,此修复程序对我有用:

Open: c:\\ProgramData\\Docker\\config\\daemon.json and add the following line: 打开:c:\\ ProgramData \\ Docker \\ config \\ daemon.json并添加以下行:

"dns": ["8.8.8.8"]

My daemon file now looks like this: 我的守护程序文件现在看起来像这样:

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": true,
  "experimental": true,
  "dns": ["8.8.8.8"],
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法加载源的服务索引 - Unable to load the service index for source Nuget 在 Azure Devops 上恢复失败,并显示消息“无法加载源的服务索引” - Nuget restore fails on Azure Devops with message "unable to load the service index for source" VSTS 无法加载源 401 的服务索引 - VSTS unable to load the service index for source 401 添加 controller -&gt; 无法加载“https://www.nuget.org/packages/Newtonsoft.json”的服务索引 - Add controller - > Unable to load the service index for “https://www.nuget.org/packages/Newtonsoft.json” 错误MSB3073以代码1退出并且无法加载源index.json的服务索引 - Error MSB3073 Exited With Code 1 and unable to load the service index for source index.json C#dotnet运行继续失败:错误:无法加载源的服务索引 - C# dotnet run keep failing: Error : Unable to load the service index for source Docker 在 asp.net 核心中离线(无互联网连接):无法加载源的服务索引 - Docker compose in asp.net core offline (no internet connexion) : unable to load the service index for source 错误:无法加载源的服务索引<url>添加到 Visual Studio 时</url> - Error: Unable to load the service index for source <URL> when adding to Visual Studio Nuget 包“在此来源中不可用” - Nuget Package “Not available in this source” 无法找到包 ***。 源中不存在具有此 ID 的包:“Local Nuget”、Microsoft Visual Studio 离线包、nuget.org - Unable to find package ***. No packages exist with this id in source(s): "Local Nuget", Microsoft Visual Studio Offline Packages, nuget.org
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM