6deb8dd4c8
Uses GetApplicationVersion(Assembly.GetExecutingAssembly()) — the same timestamp-based version already logged at startup and baked into the assembly via the csproj <Version> property. Removes the minimal-API /version endpoint from web/Program.cs and reverts the web Dockerfile APP_VERSION build-arg (no longer needed). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
536 B
Docker
18 lines
536 B
Docker
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
ARG BUILD_CONFIGURATION=Release
|
|
WORKDIR /src
|
|
|
|
COPY web/web.csproj web/
|
|
RUN dotnet restore web/web.csproj
|
|
|
|
# Copy only the web project files to avoid bringing other projects into the build context
|
|
COPY web/ web/
|
|
RUN dotnet publish web/web.csproj -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
|
WORKDIR /app
|
|
EXPOSE 8080
|
|
ENV ASPNETCORE_URLS=http://0.0.0.0:8080
|
|
|
|
COPY --from=build /app/publish .
|
|
ENTRYPOINT ["dotnet", "web.dll"] |