加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
李文强 提交于 2019-11-01 15:08 . 修改dockerfile
#使用腾讯云公共镜像,dockerfile见:https://github.com/xin-lai/aspnetcore-docker
FROM ccr.ccs.tencentyun.com/magicodes/aspnetcore-runtime:2.2 AS base
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
COPY ["src/web/Admin.Web.Host/Magicodes.Admin.Web.Host.csproj", "src/web/Admin.Web.Host/"]
COPY ["src/application/Admin.Application/Magicodes.Admin.Application.csproj", "src/application/Admin.Application/"]
COPY ["src/application/Magicodes.Admin.Application.Core/Magicodes.Admin.Application.Core.csproj", "src/application/Magicodes.Admin.Application.Core/"]
COPY ["src/data/Admin.EntityFrameworkCore/Magicodes.Admin.EntityFrameworkCore.csproj", "src/data/Admin.EntityFrameworkCore/"]
COPY ["src/core/Admin.Core.Custom/Magicodes.Admin.Core.Custom.csproj", "src/core/Admin.Core.Custom/"]
COPY ["src/core/Admin.Core/Magicodes.Admin.Core.csproj", "src/core/Admin.Core/"]
COPY ["src/core/Admin.Localization/Magicodes.Admin.Localization.csproj", "src/core/Admin.Localization/"]
COPY ["src/unity/Admin.Unity/Magicodes.Admin.Unity.csproj", "src/unity/Admin.Unity/"]
COPY ["src/web/Admin.Web.Core/Magicodes.Admin.Web.Core.csproj", "src/web/Admin.Web.Core/"]
COPY ["src/application/Admin.Application.Custom/Magicodes.Admin.Application.Custom.csproj", "src/application/Admin.Application.Custom/"]
RUN dotnet restore "src/web/Admin.Web.Host/Magicodes.Admin.Web.Host.csproj"
COPY . .
WORKDIR "/src/src/web/Admin.Web.Host"
RUN dotnet build "Magicodes.Admin.Web.Host.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "Magicodes.Admin.Web.Host.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "Magicodes.Admin.Web.Host.dll"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化