2025-03-11 18:51:08 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0@sha256:c013be6e8c5219fa56002ad96aac9d99afcca23a185aadd0a30e9b4f3d6efd8c AS base
|
2025-01-29 17:35:34 +00:00
|
|
|
USER $APP_UID
|
|
|
|
WORKDIR /app
|
|
|
|
EXPOSE 8080
|
|
|
|
EXPOSE 8081
|
|
|
|
|
2025-03-11 18:51:08 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0@sha256:4845ef954a33b55c1a1f5db1ac24ba6cedb1dafb7f0b6a64ebce2fabe611f0c0 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"]
|