35 Star 368 Fork 112

可乐不加冰 / Blog .NET Core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 998 Bytes
一键复制 编辑 原始数据 按行查看 历史
可乐不加冰 提交于 2022-04-06 12:50 . 修改文件
#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
#解决图形验证码无法显示问题
#RUN apt-get update && apt-get install libgdiplus -y
WORKDIR /app
EXPOSE 81
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["src/App.Hosting/App.Hosting.csproj", "App.Hosting/"]
COPY ["src/App.Application/App.Application.csproj", "App.Application/"]
COPY ["src/App.Core/App.Core.csproj", "App.Core/"]
COPY ["src/App.Framwork/App.Framwork.csproj", "App.Framwork/"]
RUN dotnet restore "App.Hosting/App.Hosting.csproj"
COPY . .
WORKDIR "/src/src/App.Hosting"
RUN dotnet build "App.Hosting.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "App.Hosting.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "App.Hosting.dll"]
C#
1
https://gitee.com/miss_you/Blog.git
git@gitee.com:miss_you/Blog.git
miss_you
Blog
Blog .NET Core
master

搜索帮助