2025-02-07 23:52:22 -05:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0@sha256:f77d967b8c3ec67b9af4bf577177c1a350e4f769618ff419f632b674edfa9be8 AS base
|
2025-01-29 17:35:34 +00:00
|
|
|
USER $APP_UID
|
|
|
|
WORKDIR /app
|
|
|
|
EXPOSE 8080
|
|
|
|
EXPOSE 8081
|
|
|
|
|
2025-02-07 23:52:22 -05:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0@sha256:6894a71619e08b47ef9df7ff1f436b21d21db160e5d864e180c294a53d7a12f2 AS build
|
2025-01-29 17:35:34 +00:00
|
|
|
ARG BUILD_CONFIGURATION=Release
|
|
|
|
WORKDIR /src
|
2025-01-30 17:58:13 +00:00
|
|
|
COPY ["LookingGlass.csproj", "./"]
|
|
|
|
RUN dotnet restore "LookingGlass.csproj"
|
2025-01-29 17:35:34 +00:00
|
|
|
COPY . .
|
|
|
|
WORKDIR "/src/"
|
2025-01-30 17:58:13 +00:00
|
|
|
RUN dotnet build "LookingGlass.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
2025-01-29 17:35:34 +00:00
|
|
|
|
|
|
|
FROM build AS publish
|
|
|
|
ARG BUILD_CONFIGURATION=Release
|
2025-01-30 17:58:13 +00:00
|
|
|
RUN dotnet publish "LookingGlass.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
2025-01-29 17:35:34 +00:00
|
|
|
|
|
|
|
FROM base AS final
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=publish /app/publish .
|
2025-01-30 17:58:13 +00:00
|
|
|
ENTRYPOINT ["dotnet", "LookingGlass.dll"]
|