代码拉取完成,页面将自动刷新
FROM registry.cn-beijing.aliyuncs.com/lhtzbj12/dotnet_core_aspnet:3.1 AS base
WORKDIR /app
EXPOSE 80
FROM registry.cn-beijing.aliyuncs.com/lhtzbj12/dotnet_core_sdk:3.1 AS restore
WORKDIR /src
COPY [".","."]
RUN dotnet restore
FROM restore AS Api-build
WORKDIR "/src/DockerCompose.Sample.Api"
RUN dotnet build "DockerCompose.Sample.Api.csproj" -c Release -o /app/build
FROM Api-build AS Api-publish
RUN dotnet publish "DockerCompose.Sample.Api.csproj" -c Release -o /app/publish
FROM base AS Api
WORKDIR /app
COPY --from=Api-publish /app/publish .
ENTRYPOINT ["dotnet", "DockerCompose.Sample.Api.dll"]
FROM restore AS Web-build
WORKDIR "/src/DockerCompose.Sample.Web"
RUN dotnet build "DockerCompose.Sample.Web.csproj" -c Release -o /app/build
FROM Web-build AS Web-publish
RUN dotnet publish "DockerCompose.Sample.Web.csproj" -c Release -o /app/publish
FROM base AS Web
WORKDIR /app
COPY --from=Web-publish /app/publish .
ENTRYPOINT ["dotnet", "DockerCompose.Sample.Web.dll"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。