From d29487d35772ff3f5a0d1edd1b25da7e306c4ddd Mon Sep 17 00:00:00 2001 From: witskeeper Date: Fri, 27 Sep 2024 17:57:36 +0800 Subject: [PATCH 1/7] Update pr.yml --- .github/workflows/pr.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 10ac1802..85741022 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,9 +13,13 @@ jobs: with: dotnet-version: 9.0.x global-json-file: global.json + - name: docker build + run: docker build -f src/test/NetCorePlal.Web/Dockerfile -t web:web . + - name: docker build + run: docker run web:web - name: Restore dependencies run: dotnet restore - name: Build run: dotnet build - name: Test - run: dotnet test # --verbosity normal \ No newline at end of file + run: dotnet test # --verbosity normal From b2da5f5246b65cd225b733d1dfef2e6ba61c2092 Mon Sep 17 00:00:00 2001 From: witskeeper Date: Fri, 27 Sep 2024 18:07:03 +0800 Subject: [PATCH 2/7] Update pr.yml --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 85741022..7c030981 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,7 +14,7 @@ jobs: dotnet-version: 9.0.x global-json-file: global.json - name: docker build - run: docker build -f src/test/NetCorePlal.Web/Dockerfile -t web:web . + run: docker build -f src/test/NetCorePla.Web/Dockerfile -t web:web . - name: docker build run: docker run web:web - name: Restore dependencies From 49888bfa6fcccff03da2ef27f71d1942514431ef Mon Sep 17 00:00:00 2001 From: witskeeper Date: Fri, 27 Sep 2024 18:11:33 +0800 Subject: [PATCH 3/7] Update pr.yml --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7c030981..b1d9f64a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,7 +14,7 @@ jobs: dotnet-version: 9.0.x global-json-file: global.json - name: docker build - run: docker build -f src/test/NetCorePla.Web/Dockerfile -t web:web . + run: docker build -f test/NetCorePla.Web/Dockerfile -t web:web . - name: docker build run: docker run web:web - name: Restore dependencies From 47e936a3acb3be7aa0a6f5dd4dd45feb37ac29aa Mon Sep 17 00:00:00 2001 From: witskeeper Date: Fri, 27 Sep 2024 18:33:33 +0800 Subject: [PATCH 4/7] Update pr.yml --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b1d9f64a..4990daf5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,7 +14,7 @@ jobs: dotnet-version: 9.0.x global-json-file: global.json - name: docker build - run: docker build -f test/NetCorePla.Web/Dockerfile -t web:web . + run: docker build -f test/NetCorePal.Web/Dockerfile -t web:web . - name: docker build run: docker run web:web - name: Restore dependencies From 826a97df72eade1f118b0e36ff6fe6b73a4aae87 Mon Sep 17 00:00:00 2001 From: witskeeper Date: Fri, 27 Sep 2024 18:50:39 +0800 Subject: [PATCH 5/7] Update Dockerfile --- test/NetCorePal.Web/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/NetCorePal.Web/Dockerfile b/test/NetCorePal.Web/Dockerfile index 2ef192ea..7f5febc7 100644 --- a/test/NetCorePal.Web/Dockerfile +++ b/test/NetCorePal.Web/Dockerfile @@ -1,12 +1,12 @@ #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:9.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base USER app WORKDIR /app EXPOSE 8080 EXPOSE 8081 -FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["Directory.Build.props", "."] COPY ["NuGet.config", "."] @@ -14,12 +14,12 @@ COPY ["test/NetCorePal.Web/NetCorePal.Web.csproj", "test/NetCorePal.Web/"] RUN dotnet restore "test/NetCorePal.Web/NetCorePal.Web.csproj" COPY . . WORKDIR "/src/test/NetCorePal.Web" -RUN dotnet build "NetCorePal.Web.csproj" -c Release -o /app/build +RUN dotnet build "NetCorePal.Web.csproj" -c Release -f net8.0 -o /app/build FROM build AS publish -RUN dotnet publish "NetCorePal.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false +RUN dotnet publish "NetCorePal.Web.csproj" -c Release -f net8.0 -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "NetCorePal.Web.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "NetCorePal.Web.dll"] From fcd6155566119118c2315d4ad0abfeac75086079 Mon Sep 17 00:00:00 2001 From: witskeeper Date: Fri, 27 Sep 2024 18:59:47 +0800 Subject: [PATCH 6/7] Update Dockerfile --- test/NetCorePal.Web/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/NetCorePal.Web/Dockerfile b/test/NetCorePal.Web/Dockerfile index 7f5febc7..4bd3d2c7 100644 --- a/test/NetCorePal.Web/Dockerfile +++ b/test/NetCorePal.Web/Dockerfile @@ -1,12 +1,12 @@ #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:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base USER app WORKDIR /app EXPOSE 8080 EXPOSE 8081 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build WORKDIR /src COPY ["Directory.Build.props", "."] COPY ["NuGet.config", "."] @@ -14,10 +14,10 @@ COPY ["test/NetCorePal.Web/NetCorePal.Web.csproj", "test/NetCorePal.Web/"] RUN dotnet restore "test/NetCorePal.Web/NetCorePal.Web.csproj" COPY . . WORKDIR "/src/test/NetCorePal.Web" -RUN dotnet build "NetCorePal.Web.csproj" -c Release -f net8.0 -o /app/build +RUN dotnet build "NetCorePal.Web.csproj" -c Release -f net9.0 -o /app/build FROM build AS publish -RUN dotnet publish "NetCorePal.Web.csproj" -c Release -f net8.0 -o /app/publish /p:UseAppHost=false +RUN dotnet publish "NetCorePal.Web.csproj" -c Release -f net9.0 -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app From 7658d82f8a61193f2f280ec8d8b976a8f42c886d Mon Sep 17 00:00:00 2001 From: witskeeper Date: Fri, 27 Sep 2024 19:03:39 +0800 Subject: [PATCH 7/7] Update pr.yml --- .github/workflows/pr.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4990daf5..29d44185 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,8 +15,6 @@ jobs: global-json-file: global.json - name: docker build run: docker build -f test/NetCorePal.Web/Dockerfile -t web:web . - - name: docker build - run: docker run web:web - name: Restore dependencies run: dotnet restore - name: Build