C# .net core,在docker中运行默认角度模板

C# .net core,在docker中运行默认角度模板,c#,docker,.net-core,.net-core-3.1,C#,Docker,.net Core,.net Core 3.1,我正在尝试将.NET Core 3.1中的默认角度模板作为docker实例运行 我已经在不同的页面()上读到,添加以下内容就足够了 RUN apt-get update && \ apt-get install -y wget && \ apt-get install -y gnupg2 && \ wget -qO- https://deb.nodesource.com/setup_14.x | bash - &&a

我正在尝试将.NET Core 3.1中的默认角度模板作为docker实例运行

我已经在不同的页面()上读到,添加以下内容就足够了

RUN apt-get update && \
    apt-get install -y wget && \
    apt-get install -y gnupg2 && \
    wget -qO- https://deb.nodesource.com/setup_14.x | bash - && \
    apt-get install -y build-essential nodejs
但我仍然得到以下错误:

/bin/sh: 2: /tmp/tmp859332ce906f4bcaad00b1b144b3fec4.exec.cmd: npm: not found
/src/Internationaal-Dashboard/Internationaal-Dashboard.csproj(42,5): error MSB3073: The command "npm install" exited with code 127.
The command '/bin/sh -c dotnet publish "Internationaal-Dashboard.csproj" -c Release -o /app/publish' returned a non-zero code: 1
有人知道我忘记了什么

我将在下面包含完整的docker文件:

#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
RUN apt-get update && \
    apt-get install -y wget && \
    apt-get install -y gnupg2 && \
    wget -qO- https://deb.nodesource.com/setup_14.x | bash - && \
    apt-get install -y build-essential nodejs
EXPOSE 80
EXPOSE 443

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

FROM build AS publish
RUN dotnet publish "Internationaal-Dashboard.csproj" -c Release -o /app/publish

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

尝试将
npm
添加到
apt get install-y build-essential nodejs
行中?我不知道nodesource,但在ubuntu中,我想它是在一个单独的包中。我尝试过,但添加npm没有成功。以下软件包具有未满足的依赖项:nodejs:Conflicts:npm npm:dependens:node gyp(>=3.6.2~),但不会安装它。E:无法纠正问题,您持有的软件包已损坏。