From 5f6b7faebc23f4725fffb0e6c5b38cff46468960 Mon Sep 17 00:00:00 2001 From: Brandon Ording Date: Fri, 26 Jun 2026 16:38:32 -0400 Subject: [PATCH 1/4] Control .NET runtime version with property --- src/Custom.Build.props | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Custom.Build.props b/src/Custom.Build.props index d02fe0aef2..4e5c9f214f 100644 --- a/src/Custom.Build.props +++ b/src/Custom.Build.props @@ -13,6 +13,11 @@ true + + 10.0.9 + Disable + + 5.7 minor From b62c3e3fe8059748d8a7964ae22d376e584486f5 Mon Sep 17 00:00:00 2001 From: Brandon Ording Date: Fri, 26 Jun 2026 16:39:29 -0400 Subject: [PATCH 2/4] Add FrameworkReference to make SCMU work with RuntimeFrameworkVersion --- .../ServiceControl.Config.Tests.csproj | 4 ++++ src/ServiceControl.Config/ServiceControl.Config.csproj | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/ServiceControl.Config.Tests/ServiceControl.Config.Tests.csproj b/src/ServiceControl.Config.Tests/ServiceControl.Config.Tests.csproj index c85f515177..8bafc4ae31 100644 --- a/src/ServiceControl.Config.Tests/ServiceControl.Config.Tests.csproj +++ b/src/ServiceControl.Config.Tests/ServiceControl.Config.Tests.csproj @@ -6,6 +6,10 @@ true + + + + diff --git a/src/ServiceControl.Config/ServiceControl.Config.csproj b/src/ServiceControl.Config/ServiceControl.Config.csproj index 0b163009fe..23352f154e 100644 --- a/src/ServiceControl.Config/ServiceControl.Config.csproj +++ b/src/ServiceControl.Config/ServiceControl.Config.csproj @@ -15,6 +15,10 @@ win-x64 + + + + From 7e0c0f0c9ea4b546f533192f174c23927f2f5fc2 Mon Sep 17 00:00:00 2001 From: Brandon Ording Date: Fri, 26 Jun 2026 17:23:43 -0400 Subject: [PATCH 3/4] Add runtime version to containers --- .github/workflows/build-containers.yml | 16 ++++++++++++++-- src/ServiceControl.Audit/Dockerfile | 4 +++- src/ServiceControl.Monitoring/Dockerfile | 4 +++- src/ServiceControl/Dockerfile | 4 +++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index f34bc248b2..80f57b4488 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -46,6 +46,16 @@ jobs: uses: ./.github/actions/validate-version with: version: ${{ env.MinVerVersion }} + - name: Determine runtime version + shell: pwsh + run: | + # Read settings from Custom.Build.props + [xml]$xml = Get-Content ./src/Custom.Build.props + $runtimeVersion = $xml.selectNodes('/Project/PropertyGroup/RuntimeFrameworkVersion').InnerText + if (-not ($runtimeVersion)) { + throw "Missing RuntimeFrameworkVersion setting in Custom.Build.props" + } + echo "RuntimeVersion=$runtimeVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4.0.0 - name: Log in to GitHub container registry @@ -64,6 +74,8 @@ jobs: push: true platforms: linux/amd64,linux/arm64 sbom: true + build-args: | + RUNTIMEVERSION=${{ env.RuntimeVersion }} labels: | org.opencontainers.image.source=https://github.com/Particular/ServiceControl/tree/${{ github.sha }} org.opencontainers.image.authors="Particular Software" @@ -75,7 +87,7 @@ jobs: org.opencontainers.image.created=${{ steps.date.outputs.date }} org.opencontainers.image.title=${{ matrix.title }} org.opencontainers.image.description=${{ matrix.description }} - org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra + org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:${{ env.RuntimeVersion }}-noble-chiseled-composite-extra annotations: | index:org.opencontainers.image.source=https://github.com/Particular/ServiceControl/tree/${{ github.sha }} index:org.opencontainers.image.authors="Particular Software" @@ -87,6 +99,6 @@ jobs: index:org.opencontainers.image.created=${{ steps.date.outputs.date }} index:org.opencontainers.image.title=${{ matrix.title }} index:org.opencontainers.image.description=${{ matrix.description }} - index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra + index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:${{ env.RuntimeVersion }}-noble-chiseled-composite-extra file: src/${{ matrix.project }}/Dockerfile tags: ghcr.io/particular/${{ matrix.name }}:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || env.MinVerVersion }} diff --git a/src/ServiceControl.Audit/Dockerfile b/src/ServiceControl.Audit/Dockerfile index 410f789465..4dee310716 100644 --- a/src/ServiceControl.Audit/Dockerfile +++ b/src/ServiceControl.Audit/Dockerfile @@ -1,3 +1,5 @@ +ARG RUNTIMEVERSION=10.0 + # Build image FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG TARGETARCH @@ -9,7 +11,7 @@ RUN dotnet build src/ServiceControl.Audit/ServiceControl.Audit.csproj --configur RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck # Runtime image -FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra +FROM mcr.microsoft.com/dotnet/aspnet:$RUNTIMEVERSION-noble-chiseled-composite-extra WORKDIR /app EXPOSE 44444 diff --git a/src/ServiceControl.Monitoring/Dockerfile b/src/ServiceControl.Monitoring/Dockerfile index f7fdaab4b0..4b9fe10087 100644 --- a/src/ServiceControl.Monitoring/Dockerfile +++ b/src/ServiceControl.Monitoring/Dockerfile @@ -1,3 +1,5 @@ +ARG RUNTIMEVERSION=10.0 + # Build image FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG TARGETARCH @@ -9,7 +11,7 @@ RUN dotnet build src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck # Runtime image -FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra +FROM mcr.microsoft.com/dotnet/aspnet:$RUNTIMEVERSION-noble-chiseled-composite-extra WORKDIR /app EXPOSE 33633 diff --git a/src/ServiceControl/Dockerfile b/src/ServiceControl/Dockerfile index 0f2330052c..c50ffb8490 100644 --- a/src/ServiceControl/Dockerfile +++ b/src/ServiceControl/Dockerfile @@ -1,3 +1,5 @@ +ARG RUNTIMEVERSION=10.0 + # Build image FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG TARGETARCH @@ -9,7 +11,7 @@ RUN dotnet build src/ServiceControl/ServiceControl.csproj --configuration Releas RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck # Runtime image -FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra +FROM mcr.microsoft.com/dotnet/aspnet:$RUNTIMEVERSION-noble-chiseled-composite-extra WORKDIR /app EXPOSE 33333 From 0a8911902b3715ec9d9e5d5c2de51bde25897843 Mon Sep 17 00:00:00 2001 From: Brandon Ording Date: Fri, 26 Jun 2026 18:14:39 -0400 Subject: [PATCH 4/4] Use RuntimeFrameworkVersion for package versions --- src/Directory.Packages.props | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 66e8440f71..e47fe3014a 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -7,7 +7,7 @@ - + @@ -16,17 +16,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -72,25 +72,25 @@ - - - + + + - + - - + + - + - - - - + + + +