我有以下内容
Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.2.207 AS dotnet-builder
WORKDIR /workdir
COPY ./ .
RUN dotnet restore "/workdir/Application.Host/Application.Host.csproj"
RUN dotnet publish "/workdir/Application.Host/Application.Host.csproj" -c Release -o /workdir/Application.Host/out
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2.8
WORKDIR /workdir
COPY --from=dotnet-builder /workdir/Application.Host/Application.Host/out .
EXPOSE 80
ENTRYPOINT ["dotnet", "Application.Host.dll"]
我的容器在
linux
机器上运行。在Dockerfile
中是否需要将发布模式设置为linux
?例如:
dotnet publish "/workdir/Application.Host/Application.Host.csproj" --os linux --arch x64 /t:PublishContainer -c Release -o /workdir/Application.Host/out
对性能有影响吗?