1 Star 1 Fork 2

jobily/OrchardCore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 865 Bytes
一键复制 编辑 原始数据 按行查看 历史
Sébastien Ros 提交于 2024-12-04 09:59 . Add support for net9.0 (#16573)
# TARGETARCH and TARGETOS are set automatically when --platform is provided.
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
ARG TARGETOS
LABEL stage=build-env
WORKDIR /source
# copy required files for building
# .dockerignore excludes App_Data and binaries from these
COPY ./src ./src
COPY Directory.Build.props .
COPY Directory.Packages.props .
# build, results are placed in /app
RUN dotnet publish src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj -c Release -o /app --framework net9.0 /p:RunAnalyzers=false
# build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:9.0-nanoserver-1809 AS build_windows
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS build_linux
FROM build_${TARGETOS} AS aspnet
EXPOSE 80
ENV ASPNETCORE_URLS=http://+:80
WORKDIR /app
COPY --from=build-env /app/ .
ENTRYPOINT ["dotnet", "OrchardCore.Cms.Web.dll"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/hubo/OrchardCore.git
git@gitee.com:hubo/OrchardCore.git
hubo
OrchardCore
OrchardCore
main

搜索帮助