gpt4 book ai didi

c# - MS dotnet 核心容器镜像拉取失败,错误 : CTC1014

转载 作者:行者123 更新时间:2023-12-05 04:47:14 24 4
gpt4 key购买 nike

我正在尝试为小型 dotnet core 3.1 控制台应用程序构建新镜像。我收到一个错误:

failed to solve with frontend dockerfile.v0: failed to create LLBdefinition: failed to copy: httpReadSeeker: failed open: failed to dorequest: Gethttps://westeurope.data.mcr.microsoft.com/42012bb2682a4d76ba7fa17a9d9a9162-qb2vm9uiex//docker/registry/v2/blobs/sha256/87/87413803399bebbe093cfb4ef6c89d426c13a62811d7501d462f2f0e018321bb/data?P1=1627480321&P2=1&P3=1&P4=uDGSoX8YSljKnDQVR6fqniuqK8fjkRvyngwKxM7ljlM%3D&se=2021-07-28T13%3A52%3A01Z&sig=wJVu%2BBQo2sldEPr5ea6KHdflARqlzPZ9Ap7uBKcEYYw%3D&sp=r&spr=https&sr=b&sv=2016-05-31&regid=42012bb2682a4d76ba7fa17a9d9a9162:x509: certificate has expired or is not yet valid

我检查了一个旧的 dotnet 程序,我的 dockerfile 运行良好。我得到了同样的错误。然后,我跳转到 Docker Hub 查看 MS 镜像,发现所有 MS 镜像都更新了一个小时。然后他们再次更新,10 分钟前 xD。但是,我仍然无法拉取 mcr.microsoft.com/dotnet/runtime:3.1 和 mcr.microsoft.com/dotnet/sdk:3.1 的基础镜像。我的整个 Dockerfile 是:

FROM mcr.microsoft.com/dotnet/runtime:3.1 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
WORKDIR /src
COPY ["Kafka-dotnet-consumer/Kafka-dotnet-consumer.csproj", "Kafka-dotnet-consumer/"]
RUN dotnet restore "Kafka-dotnet-consumer/Kafka-dotnet-consumer.csproj"
COPY . .
WORKDIR "/src/Kafka-dotnet-consumer"
RUN dotnet build "Kafka-dotnet-consumer.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Kafka-dotnet-consumer.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Kafka-dotnet-consumer.dll"]

完整的错误日志是:

Severity    Code    Description Project File    Line    Suppression State
Error CTC1014 Docker command failed with exit code 1.
#1 [internal] load build definition from Dockerfile
#1 sha256:356bc2781f52b021d6dc2eefeef3212c983066d4fe3637fe7928c8165f181c52
#1 DONE 0.0s

#1 [internal] load build definition from Dockerfile
#1 sha256:356bc2781f52b021d6dc2eefeef3212c983066d4fe3637fe7928c8165f181c52
#1 transferring dockerfile: 826B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:158b62c61546176b0f8a68c34f4aed7fe8e5f979cc578672dacd3c07aff01eb1
#2 transferring context: 35B done
#2 DONE 0.0s

#3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:3.1-alpine
#3 sha256:9c4e2456483bc5a0fda4bf0466bb996bef09b180bf33a44ede0bd988c1be9178
#3 ...

#4 [internal] load metadata for mcr.microsoft.com/dotnet/runtime:3.1-alpine
#4 sha256:46a3f71ff7a02c9ad1111e95e06323b127c541ea25dc1bca0750bc3a2ea917ca
#4 ERROR: failed to copy: httpReadSeeker: failed open: failed to do request: Get https://westeurope.data.mcr.microsoft.com/42012bb2682a4d76ba7fa17a9d9a9162-qb2vm9uiex//docker/registry/v2/blobs/sha256/87/87413803399bebbe093cfb4ef6c89d426c13a62811d7501d462f2f0e018321bb/data?P1=1627480321&P2=1&P3=1&P4=uDGSoX8YSljKnDQVR6fqniuqK8fjkRvyngwKxM7ljlM%3D&se=2021-07-28T13%3A52%3A01Z&sig=wJVu%2BBQo2sldEPr5ea6KHdflARqlzPZ9Ap7uBKcEYYw%3D&sp=r&spr=https&sr=b&sv=2016-05-31&regid=42012bb2682a4d76ba7fa17a9d9a9162: x509: certificate has expired or is not yet valid

#3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:3.1-alpine
#3 sha256:9c4e2456483bc5a0fda4bf0466bb996bef09b180bf33a44ede0bd988c1be9178
#3 CANCELED
------
> [internal] load metadata for mcr.microsoft.com/dotnet/runtime:3.1-alpine:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to copy: httpReadSeeker: failed open: failed to do request: Get https://westeurope.data.mcr.microsoft.com/42012bb2682a4d76ba7fa17a9d9a9162-qb2vm9uiex//docker/registry/v2/blobs/sha256/87/87413803399bebbe093cfb4ef6c89d426c13a62811d7501d462f2f0e018321bb/data?P1=1627480321&P2=1&P3=1&P4=uDGSoX8YSljKnDQVR6fqniuqK8fjkRvyngwKxM7ljlM%3D&se=2021-07-28T13%3A52%3A01Z&sig=wJVu%2BBQo2sldEPr5ea6KHdflARqlzPZ9Ap7uBKcEYYw%3D&sp=r&spr=https&sr=b&sv=2016-05-31&regid=42012bb2682a4d76ba7fa17a9d9a9162: x509: certificate has expired or is not yet valid Kafka-dotnet-consumer C:\Ziad\repos\vdpm-datagrid\Kafka-dotnet-consumer\Kafka-dotnet-consumer\Dockerfile 1

有什么想法吗?

最佳答案

正如@Chris Culter 在上面的评论中提到的那样,我刚刚重新启动了我的机器,它又可以工作了。

这有点奇怪,因为我已经更新了我的 Docker Desktop、重新启动并清理/清除了 docker 数据。这些都没有帮助,只是在重新启动我的 Windows 后它再次工作!

关于c# - MS dotnet 核心容器镜像拉取失败,错误 : CTC1014,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68561615/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com