Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
witskeeper authored Sep 27, 2024
1 parent 826a97d commit fcd6155
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/NetCorePal.Web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#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", "."]
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
Expand Down

0 comments on commit fcd6155

Please sign in to comment.