I created a .Net Core app in Visual Sutdio 2019 and added docker support so it automatically generates the file but when I build the docker image the output says:
1>/root/.nuget/packages/microsoft.typescript.msbuild/3.9.5/tools/Microsoft.TypeScript.targets(551,5):
error MSB6003: The specified task executable "node" could not be run. System.ComponentModel.Win32Exception
(2): No such file or directory [/src/CyberEvalNextGen.csproj]
I assume there is an issue with COPY but I am not sure.
Here is my docker file:
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["CyberEvalNextGen.csproj", ""]
RUN dotnet restore "./CyberEvalNextGen.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "CyberEvalNextGen.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "CyberEvalNextGen.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "CyberEvalNextGen.dll"]