Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .devcontainer/aspire/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": ".NET Aspire",
// Base .NET 9 image. Alternatively a Dockerfile/compose could be used.
"image": "mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm",
// Current stable .NET SDK is installed by the versioned feature below.
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:3": {},
"ghcr.io/devcontainers/features/dotnet:2": { "version": "10.0.401" },
"ghcr.io/devcontainers/features/docker-in-docker:4": {},
"ghcr.io/devcontainers/features/powershell:2": {}
},

Expand Down
17 changes: 17 additions & 0 deletions .devcontainer/aspire/runtime-smoke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
test "$(id -u)" -ne 0
docker version
docker run --rm hello-world
dotnet --info
export PATH="$HOME/.aspire/bin:$PATH"
aspire --version
dotnet build src/aspire/DevContainers.Aspire.AppHost/DevContainers.Aspire.AppHost.csproj --configuration Release
ASPNETCORE_ENVIRONMENT=Development dotnet run --project src/aspire/DevContainers.Aspire.ApiService/DevContainers.Aspire.ApiService.csproj --no-build --configuration Release --urls http://127.0.0.1:18088 > /tmp/sample-api.log 2>&1 &
api_pid=$!
trap 'kill "$api_pid" 2>/dev/null || true' EXIT
for attempt in $(seq 1 30); do
if curl --fail --silent http://127.0.0.1:18088/weatherforecast > /tmp/weather.json; then break; fi
sleep 2
done
curl --fail --silent http://127.0.0.1:18088/weatherforecast
26 changes: 26 additions & 0 deletions .github/workflows/devcontainer-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Devcontainer validation
on:
push:
branches: [main]
paths: ['.devcontainer/**', 'src/aspire/**', 'global.json', '.github/workflows/devcontainer-validation.yml']
pull_request:
branches: [main]
permissions:
contents: read
jobs:
devcontainer:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
npm_config_ignore_scripts: 'true'
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: '26.10.0'
- name: Build and start the devcontainer on this disposable runner
run: npx --yes @devcontainers/cli@0.89.0 up --workspace-folder . --config .devcontainer/aspire/devcontainer.json
- name: Validate non-root Docker and the sample environment
run: npx --yes @devcontainers/cli@0.89.0 exec --workspace-folder . --config .devcontainer/aspire/devcontainer.json bash .devcontainer/aspire/runtime-smoke.sh
5 changes: 5 additions & 0 deletions docs/runtime-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Runtime upgrade validation

The devcontainer is built and started on a disposable GitHub-hosted Linux runner. The job uses no cloud secrets, persists no checkout credentials, and never accesses a personal or Gateway Docker socket. The Docker-in-Docker feature owns its nested daemon.

The Aspire sample now targets .NET 10 with SDK 10.0.401 and current stable Aspire/OpenTelemetry dependencies. CI checks the installed SDK and Aspire CLI, compiles the AppHost and its referenced projects, and starts the API sample for an HTTP smoke test.
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "10.0.401",
"rollForward": "latestPatch",
"allowPrerelease": false
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.4.0" />
<Sdk Name="Aspire.AppHost.Sdk" Version="13.5.4" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.4.0" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.5.4" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireSharedProject>true</IsAspireSharedProject>
Expand All @@ -10,13 +10,13 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.7.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="9.4.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.15.3" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.12.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.12.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.10.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="10.10.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.19.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.19.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.19.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.19.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.19.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Loading