F
F
fan92rus2019-12-09 18:11:31
ASP.NET
fan92rus, 2019-12-09 18:11:31

Why doesn't docker build the asp net core container?

FROM mcr.microsoft.com/dotnet/core/aspnet:3.0
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 5432

FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
WORKDIR /src
COPY . /AvitoHelper
WORKDIR /AvitoHelper
RUN dotnet restore
RUN dotnet publish -c Release -o out

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

Here is such a file and when I try to build I get
Failed to download package 'NSwag.AspNetCore.13.1.6' from 'https://api.nuget.org/v3-flatcontainer/nswag.aspnetcore/13.1.6/nswag.aspnetcore.13.1.6.nupkg'.
   Received an unexpected EOF or 0 bytes from the transport stream.

on every package

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2019-12-09
@vitaly_il1

Check that your machine has Internet and DNS. That is what you can manually download https://api.nuget.org/v3-flatcontainer/nswag.aspne...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question