美文网首页
dotnet docker compose 示例

dotnet docker compose 示例

作者: 随遇而安_cc | 来源:发表于2023-08-21 09:07 被阅读0次

    # syntax=docker/dockerfile:1

    FROM mcr.microsoft.com/dotnet/sdk:7.0 as build-env

    WORKDIR /app

    COPY . .

    RUN dotnet restore

    RUN dotnet publish -c Release -o /publish

    FROM mcr.microsoft.com/dotnet/aspnet:7.0 as runtime

    WORKDIR /src

    COPY --from=build-env /publish .

    EXPOSE 80

    ENTRYPOINT ["dotnet", "myWebApp.dll"]

    相关文章

      网友评论

          本文标题:dotnet docker compose 示例

          本文链接:https://www.haomeiwen.com/subject/kabemdtx.html