2016-11-29 252 views
0

我試圖建立一個asp.net應用程序代碼的碼頭工人容器我得到的錯誤,而試圖獲取的NuGet包在Asp.net核心

的碼頭工人,容器的NuGet CA證書錯誤泊塢窗構建 - 我的:容器。

Sending build context to Docker daemon 9.58 MB 
Step 1 : FROM microsoft/dotnet:latest 
---> 3693707d4f7f 
Step 2 : COPY . /app 
---> Using cache 
---> 22a461236738 
Step 3 : WORKDIR /app 
---> Using cache 
---> 8bea2af489ad 
Step 4 : RUN dotnet restore 
---> Running in 5fbfe078c820 
log : Restoring packages for /app/project.json... 
error: Unable to load the service index for source https://api.nuget.org/v3/index.json. 
error: An error occurred while sending the request. 
error: Peer certificate cannot be authenticated with given CA certificates 
The command 'dotnet restore' returned a non-zero code: 1 

我現在用的dockerfile是一個非常標準的一個基於微軟/ DOTNET:最新的容器。

FROM microsoft/dotnet:latest 
COPY . /app 
WORKDIR /app 

RUN ["dotnet", "restore"] 
RUN ["dotnet", "build"] 

EXPOSE 9881/tcp 
ENV ASPNETCORE_URLS http://*:9881 

ENTRYPOINT ["dotnet", "run"] 

這曾經工作一段時間以前,東西似乎已經破碎,但我不知道會是什麼。

回答

0

問題是我一直在使用docker的實驗版本1.12.3。

現在,我安裝了最新的官方版本的Windows(仍然是1.12.3,但沒有標記爲實驗)的一切都很好。