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"]
这曾经工作一段时间以前,东西似乎已经破碎,但我不知道会是什么。