Skip to content

Commit

Permalink
Merge pull request #87 from netcorepal/fix-dockerfile
Browse files Browse the repository at this point in the history
try fix dockerfile
  • Loading branch information
witskeeper authored Sep 27, 2024
2 parents dd2482c + 7658d82 commit f9b638a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ jobs:
with:
dotnet-version: 9.0.x
global-json-file: global.json
- name: docker build
run: docker build -f test/NetCorePal.Web/Dockerfile -t web:web .
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Test
run: dotnet test # --verbosity normal
run: dotnet test # --verbosity normal
6 changes: 3 additions & 3 deletions test/NetCorePal.Web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 net9.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 net9.0 -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "NetCorePal.Web.dll"]
ENTRYPOINT ["dotnet", "NetCorePal.Web.dll"]

0 comments on commit f9b638a

Please sign in to comment.