1 Star 1 Fork 4

lhtzbj12/netcore_docker_compose

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 984 Bytes
一键复制 编辑 原始数据 按行查看 历史
root 提交于 2020-08-12 22:06 . 修改镜像为阿里云镜像
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"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/lhtzbj12/netcore_docker_compose.git
[email protected]:lhtzbj12/netcore_docker_compose.git
lhtzbj12
netcore_docker_compose
netcore_docker_compose
master

搜索帮助