Играюсь тут с Докером. Хочу образ с проектом собрать. Вот Докерфайл:
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /source
COPY . ./
RUN dotnet publish pornosite -c Debug -o pornosite-build
# final stage/image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /pornosite
COPY --from=build /source/pornosite-build ./
ENTRYPOINT ["dotnet", "pornosite.dll"]
Но на этапе сборки вылезает такое:
Step 4/8 : RUN dotnet publish pornosite -c Debud -o pornosite
---> Running in 4d31dbab9153
Microsoft (R) Build Engine version 16.7.2+b60ddb6f4 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
Failed to download package 'Newtonsoft.Json.12.0.3' from 'https://api.nuget.org/v3-flatcontainer/newtonsoft.json/12.0.3/newtonsoft.json.12.0.3.nupkg'.
Received an unexpected EOF or 0 bytes from the transport stream.
Failed to download package 'System.Text.Encoding.Extensions.4.3.0' from 'https://api.nuget.org/v3-flatcontainer/system.text.encoding.extensions/4.3.0/system.text.encoding.extensions.4.3.0.nupkg'.
Received an unexpected EOF or 0 bytes from the transport stream.
Failed to download package 'System.Text.Encoding.4.3.0' from 'https://api.nuget.org/v3-flatcontainer/system.text.encoding/4.3.0/system.text.encoding.4.3.0.nupkg'.
Received an unexpected EOF or 0 bytes from the transport stream.
Failed to download package 'System.Net.Http.4.3.0' from 'https://api.nuget.org/v3-flatcontainer/system.net.http/4.3.0/system.net.http.4.3.0.nupkg'.
Received an unexpected EOF or 0 bytes from the transport stream.
Failed to download package 'System.Diagnostics.Tracing.4.3.0' from 'https://api.nuget.org/v3-flatcontainer/system.diagnostics.tracing/4.3.0/system.diagnostics.tracing.4.3.0.nupkg'.
Received an unexpected EOF or 0 bytes from the transport stream.
Failed to download package 'Newtonsoft.Json.12.0.3' from 'https://api.nuget.org/v3-flatcontainer/newtonsoft.json/12.0.3/newtonsoft.json.12.0.3.nupkg'.
Received an unexpected EOF or 0 bytes from the transport stream.
Restored /source/Shared/Shared.csproj (in 1.64 min).
Restored /source/pornosite/pornosite.csproj (in 1.64 min).
При этом сборка не падает, а доходит успешно до конца.
Почему так?