1 Star 3 Fork 1

Bili执笔小白/CSharp_DistributedCache_Simple

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 723 Bytes
一键复制 编辑 原始数据 按行查看 历史
Bili执笔小白 提交于 2023-07-20 17:35 +08:00 . 完成WebAPI版 MemoryCache示例
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["MemoryCache_WebAPI.csproj", "."]
RUN dotnet restore "./MemoryCache_WebAPI.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "MemoryCache_WebAPI.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "MemoryCache_WebAPI.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MemoryCache_WebAPI.dll"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/qq28069933146_admin/csharp_distributedcache_simple.git
git@gitee.com:qq28069933146_admin/csharp_distributedcache_simple.git
qq28069933146_admin
csharp_distributedcache_simple
CSharp_DistributedCache_Simple
master

搜索帮助