pages/Dockerfile

16 lines
379 B
Text
Raw Normal View History

2024-10-06 19:50:15 +00:00
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["pages.csproj", "./"]
RUN dotnet restore "pages.csproj"
COPY . .
RUN dotnet publish "pages.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app/publish .
ENV ASPNETCORE_HTTP_PORTS=80
EXPOSE 80
ENTRYPOINT ["dotnet", "pages.dll"]