I've tried to build my Docker image and this is what happens when I build it. Is there any wrong setting?
2>C:\Program Files\dotnet\sdk\2.2.100\NuGet.targets(114,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\src\DockNetMicro\DockNetMicro.csproj] 2>C:\Program Files\dotnet\sdk\2.2.100\NuGet.targets(114,5): error : No such host is known [C:\src\DockNetMicro\DockNetMicro.csproj] 2>The command 'cmd /S /C dotnet restore "DockNetMicro/DockNetMicro.csproj"' returned a non-zero code: 1 2>C:\Users\rizka.hasmulyawan.nuget\packages\microsoft.visualstudio.azure.containers.tools.targets\1.0.2105168\build\Container.targets(159,5): error MSB3073: The command "docker build -t "docknetmicro" -f "e:\work\note\netcoretest\docknetmicro\docknetmicro\dockerfile" --label "com.microsoft.created-by=visual-studio" ".."" exited with code 1. 2>Done building project "DockNetMicro.csproj" -- FAILED.
this is my Dockerfile
FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803 AS base WORKDIR /app EXPOSE 80 EXPOSE 443
FROM microsoft/dotnet:2.2-sdk-nanoserver-1803 AS build WORKDIR /src COPY ["DockNetMicro/DockNetMicro.csproj", "DockNetMicro/"] RUN dotnet restore "DockNetMicro/DockNetMicro.csproj" COPY . . WORKDIR "/src/DockNetMicro" RUN dotnet build "DockNetMicro.csproj" -c Release -o /app
FROM build AS publish RUN dotnet publish "DockNetMicro.csproj" -c Release -o /app
FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "DockNetMicro.dll"]