1 Star 0 Fork 88

孤海飞雁/基于NET6平台WebApi尝鲜项目

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 782 Bytes
一键复制 编辑 原始数据 按行查看 历史
昨夜丶雨疏风骤 提交于 2022-01-15 16:47 . 添加docker支持
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["NET6.Api/NET6.Api.csproj", "NET6.Api/"]
COPY ["NET6.Infrastructure/NET6.Infrastructure.csproj", "NET6.Infrastructure/"]
COPY ["NET6.Domain/NET6.Domain.csproj", "NET6.Domain/"]
RUN dotnet restore "NET6.Api/NET6.Api.csproj"
COPY . .
WORKDIR "/src/NET6.Api"
RUN dotnet build "NET6.Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "NET6.Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "NET6.Api.dll"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/liujian1368928/net6-project.git
git@gitee.com:liujian1368928/net6-project.git
liujian1368928
net6-project
基于NET6平台WebApi尝鲜项目
master

搜索帮助