2025-03-18 01:31:04 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0@sha256:4f0ad314f83e6abeb6906e69d0f9c81a0d2ee51d362e035c7d3e6ac5743f5399 AS base
|
2025-01-29 17:35:34 +00:00
|
|
|
USER $APP_UID
|
|
|
|
WORKDIR /app
|
|
|
|
EXPOSE 8080
|
|
|
|
EXPOSE 8081
|
|
|
|
|
2025-03-18 01:31:04 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:9.0@sha256:712ffb3919c095da6129ba5ed9d0e7660ab45b966140819d1d58e081bef64293 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"]
|