diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index bc9bc27..ec846e1 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -10,14 +10,14 @@
"rollForward": false
},
"dotnet-inspect": {
- "version": "0.27.0",
+ "version": "0.28.0",
"commands": [
"dotnet-inspect"
],
"rollForward": false
},
"purview.build": {
- "version": "0.9.0",
+ "version": "0.9.2",
"commands": [
"purview-build"
],
diff --git a/.editorconfig b/.editorconfig
index a9b39cb..b0390ec 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,4 @@
-# Purview.BuildSdk 2.0.0 - managed file, do not edit
+# Purview.BuildSdk 2.2.0 - managed file, do not edit
#
# This file is written by Purview.BuildSdk and is replaced whenever the SDK version changes. The version
# on the first line is how the SDK recognises a file it owns: a .editorconfig without that marker is
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index c83922a..98df299 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -6,10 +6,15 @@ on:
# `ready_for_review` is not one of the default activity types, so a draft PR would never
# re-evaluate the required build gate once it is marked ready for review.
types: [opened, synchronize, reopened, ready_for_review]
+ # Every merge to main is built and tested too, so main's own status reflects what was merged rather
+ # than the last PR head. This never publishes: releases still come only from release/** (release.yml).
+ push:
+ branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
+ # A newer push to a PR supersedes the older run; on main every merge gets its own complete run.
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
diff --git a/AGENTS.md b/AGENTS.md
index 2ee30fc..10bb2f4 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -131,20 +131,22 @@ whenever a target framework, a backend package or the `buildTransitive` assets c
dropped): `Purview.Containers.Core` (abstractions) and the service modules target **`net10.0` and
`net11.0`** on any platform. `Purview.Containers.Wsl` is **multi-target**: `net10.0`/`net11.0` (portable
facades) and `net10.0-windows10.0.19041.0`/`net11.0-windows10.0.19041.0` (the WSLC implementations).
- Purview.BuildSdk's `Current` target-framework set supplies the `net10.0;net11.0` list to the library
- subtree, while `src/Directory.Build.props` pins that set to `net11.0-windows10.0.19041.0` for
- `src/tests` so the WSLC tests bind the implementation; `Wsl.csproj` adds the Windows
- builds with a platform-identifier condition (never a literal TFM). The Docker integration projects
+ `src/Directory.Build.props` selects Purview.BuildSdk's `Supported` target-framework set
+ (`PurviewTargetFrameworkSet=Supported`, `net10.0;net11.0` in BuildSdk 2.2.0) for every project that
+ declares no target of its own, and pins that set to `net11.0-windows10.0.19041.0` for `src/tests` so
+ the WSLC tests bind the implementation. `Wsl.csproj` derives its four targets from the same set (each
+ supported framework plus its `-windows10.0.19041.0` build) and selects files with a
+ platform-identifier condition (never a literal TFM). The Docker integration projects
declare `net10.0` directly so they run on Linux **and** keep the lowest supported framework under test.
The contract, the failures that enforce it and the CI workarounds are documented in
[Consumer Requirements](docs/wiki/Consumer-Requirements.md); update that page whenever a target
framework, the `buildTransitive` defaults, the payload layout or the `PCC0001`/`PCC0002` guards change.
-- The `net11.0` library builds are compiled with `runtime-async=on` (`PurviewRuntimeAsync=false` opts out):
- Purview.BuildSdk applies it to every `net11.0`+ target together with the C# 15
- `updated-memory-safety-rules` tier (`MemorySafetyRules=2`), so the repository does not repeat either
- switch. The runtime manages suspension instead of compiler-generated state machines, which lowers async
- overhead and makes live stack traces name the real methods. `Wsl.UnitTests/BuildFeatureTests.cs` guards
- it. The `net10.0` builds keep the classic state machines. Because `closed` hierarchies require
+- The `net11.0` builds are compiled with `runtime-async=on` and the C# 15
+ `updated-memory-safety-rules` tier. Purview.BuildSdk 2.2.0 makes both **opt-in**, so
+ `src/Directory.Build.props` sets `PurviewRuntimeAsync=true` and `MemorySafetyRules=2` explicitly; do not
+ remove them. The runtime manages suspension instead of compiler-generated state machines, which lowers
+ async overhead and makes live stack traces name the real methods. `Wsl.UnitTests/BuildFeatureTests.cs`
+ guards both. The `net10.0` builds keep the classic state machines. Because `closed` hierarchies require
`System.Runtime.CompilerServices.IsClosedTypeAttribute` and C# unions require `UnionAttribute` (both
.NET 11 runtime types), neither is used: no public hierarchy here is closed anyway — `WaitStrategy`,
`ContainerException` and the backend interfaces are documented extension points.
@@ -162,8 +164,9 @@ whenever a target framework, a backend package or the `buildTransitive` assets c
tests) registers explicitly instead — `WslcTest.EnsureBackendRegistered()`.
- `src/Directory.Build.props` sets `EnableWindowsTargeting=true` because the shared CI agent is
`ubuntu-latest`; removing it fails the pipeline with `NETSDK1100`.
-- The project is **experimental**: keep the experimental notice in `README.md`, `docs/wiki/Home.md` and
- the package READMEs, and keep versions on a `-prerelease.N` suffix.
+- Versions stay on a `-prerelease.N` suffix until the stable 1.0.0 release, which includes the WSL
+ Containers backend. The docs, README and package READMEs must not carry experimental or preview
+ notices.
## Module rules
@@ -254,8 +257,10 @@ Commit messages follow Conventional Commits enforced by the `commit-msg` lefthoo
## Versioning and releases
- `package.json` is the authoritative release and package version. Do not diverge project versions by hand.
-- `.github/workflows/pr.yml` builds and tests pull requests through the shared
- `purview-dev/build/.github/workflows/purview-build.yml`, with pack and validation enabled.
+- `.github/workflows/pr.yml` builds and tests pull requests **and every push to `main`** through the
+ shared `purview-dev/build/.github/workflows/purview-build.yml`, with pack and validation enabled (plus
+ the Docker and WSLC contract jobs). A push to `main` never publishes; superseded PR runs are
+ cancelled, `main` runs are not.
- `.github/workflows/release.yml` runs the shared release pipeline with `release-mode: NuGet` on a push to a
`release/**` branch (or a manual dispatch), **not** on a push to `main`. Cut a release by merging the
version bump into `main`, then pushing a `release/v…` branch named after the version from it (for
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 4534c24..9089c6d 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -29,7 +29,7 @@
3.0.5
10.0.26100.80
- 1.76.0
+ 1.87.0
@@ -38,20 +38,20 @@
.NET 10 servicing line on purpose: the .NET 8/.NET 9 lines are no longer supported, and a
component declares the lowest band a consumer on the oldest supported framework can take.
-->
-
+
-
+
-
+
-
-
-
+
+
+
@@ -62,21 +62,21 @@
package is licensed under the Microsoft Testing Platform Tools terms, which permit use in
OSI-approved open-source projects; it never ships in a Purview package.
-->
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
diff --git a/README.md b/README.md
index a4be38a..0c0da21 100644
--- a/README.md
+++ b/README.md
@@ -34,21 +34,16 @@ Testcontainers' `WithCleanUp`: containers are removed by default, `.WithCleanUp(
for inspection, and `.WithAutoRemove()` is opted into separately. See
[Capabilities and Cancellation](docs/wiki/Backend-Capabilities.md) for APIs, ownership and limits.
-> **Experimental.** This project is an experiment in running throwaway containers through Microsoft
-> WSL Containers. The public API, defaults and packaging rules can change between prereleases, and
-> there is no production support guarantee. Pin the exact package version you build against, and read
-> [Consumer Requirements](docs/wiki/Consumer-Requirements.md) before adopting it.
-
-> **Status: preview.** Backend-neutral abstractions, two backends (WSL Containers and Docker), wait
-> strategies, the `Image`/`Tag` parser, registry auth, observability, hardening, and **nine service
-> modules** (PostgreSQL, Redis, SQL Server, RabbitMQ, Azurite, NATS, MySQL, Azure Key Vault Emulator, Azure Service Bus Emulator). On WSLC, **images are shared
-> by default** (`StorageMode.Shared`): sessions reuse a stable image store
-> (`%LOCALAPPDATA%\Purview\WslContainers\images`) so images are pulled once, not per session;
-> `StorageMode.PerSession` provides isolation. Move the store with `PURVIEW_CONTAINERS_STORAGE_PATH` or
-> `WslContainerRuntimeOptions.StoragePath`. Named volumes are retained by default; set
-> `PURVIEW_CONTAINERS_CLEAN_VOLUMES=true` (or `ContainerCleanup.CleanUpVolumesOnExit`) to delete the
-> volumes the library created when the process or session ends. Runnable samples live in
-> `samples/getting-started`.
+**Features.** Backend-neutral abstractions, two backends (WSL Containers and Docker), wait
+strategies, the `Image`/`Tag` parser, registry auth, observability, hardening, and **nine service
+modules** (PostgreSQL, Redis, SQL Server, RabbitMQ, Azurite, NATS, MySQL, Azure Key Vault Emulator, Azure
+Service Bus Emulator). On WSLC, **images are shared by default** (`StorageMode.Shared`): sessions reuse a
+stable image store (`%LOCALAPPDATA%\Purview\WslContainers\images`) so images are pulled once, not per
+session; `StorageMode.PerSession` provides isolation. Move the store with
+`PURVIEW_CONTAINERS_STORAGE_PATH` or `WslContainerRuntimeOptions.StoragePath`. Named volumes are retained
+by default; set `PURVIEW_CONTAINERS_CLEAN_VOLUMES=true` (or `ContainerCleanup.CleanUpVolumesOnExit`) to
+delete the volumes the library created when the process or session ends. Runnable samples live in
+`samples/getting-started`.
**Documentation:** [Containers documentation](https://purview.dev/docs/containers/)
@@ -60,7 +55,7 @@ for inspection, and `.WithAutoRemove()` is opted into separately. See
referencing the umbrella package, Testcontainers or WSLC. It verifies native paths, running WSL
translations and explicit shared-remote mappings against the daemon using two-way file markers.
`Purview.Containers.Aspire` adds opt-in `builder.AddContainerEnvironment()` integration for any
-Aspire AppHost. Both target `net10.0` and `net11.0`; the adapter requires Aspire 13.6.5 or later.
+Aspire AppHost. Both target `net10.0` and `net11.0`; the adapter requires Aspire 17.0.0 or later.
These are separate from the existing Docker backend's automatic WSL2 path handling.
Docker Engine inside a WSL distribution is not Microsoft WSL Containers.
See the [environment package guide](src/src/Environment/Sdk/README.md) and
diff --git a/docs/wiki/Architecture.md b/docs/wiki/Architecture.md
index 9d66cfb..8a4d034 100644
--- a/docs/wiki/Architecture.md
+++ b/docs/wiki/Architecture.md
@@ -53,16 +53,18 @@ Microsoft types (`Session`, `Container`, `Process`, `ContainerSettings`, …) ar
## Target frameworks
Every package ships `net10.0` and `net11.0` assets. **.NET 8 and .NET 9 are dropped**; the contract is in
-[Consumer Requirements](Consumer-Requirements.md). Purview.BuildSdk's `Current` target-framework set
-supplies that pair; the repository does not hand-maintain it.
+[Consumer Requirements](Consumer-Requirements.md). Purview.BuildSdk's `Supported` target-framework set
+(selected in `src/Directory.Build.props`) supplies that pair; the repository does not hand-maintain it,
+and the WSL backend derives its Windows builds from the same set.
- `net10.0` is the floor. A consumer that has not moved to .NET 11 keeps the classic compiler-generated
async state machines and the .NET 10 library surface.
- `net11.0` is compiled with `runtime-async=on` and the C# 15 updated memory-safety rules
(`MemorySafetyRules=2`). The runtime manages suspension and resumption instead of compiler-generated
state machines, which lowers async overhead and makes live stack traces (profiler, `new StackTrace()`,
- debugger) name the real methods. `PurviewRuntimeAsync=false` opts out for a local experiment;
- `Wsl.UnitTests/BuildFeatureTests.cs` guards that the shipped default is on.
+ debugger) name the real methods. Purview.BuildSdk 2.2.0 makes both features opt-in, so
+ `src/Directory.Build.props` enables them (`PurviewRuntimeAsync=true`, `MemorySafetyRules=2`);
+ `Wsl.UnitTests/BuildFeatureTests.cs` guards that both are on in the shipped build.
- The WSL Containers backend uses the same split for its Windows builds, and a single implementation
payload serves both portable targets because a .NET 11 process loads a .NET 10 assembly.
diff --git a/docs/wiki/Backends.md b/docs/wiki/Backends.md
index d04c251..ceb1d39 100644
--- a/docs/wiki/Backends.md
+++ b/docs/wiki/Backends.md
@@ -224,7 +224,7 @@ dotnet add package Purview.Containers.Wsl
enable
-
+
```
@@ -253,7 +253,7 @@ dotnet add package Purview.Containers.Docker
enable
-
+
```
@@ -278,7 +278,7 @@ dotnet add package Purview.Containers
enable
-
+
```
diff --git a/docs/wiki/Consumer-Requirements.md b/docs/wiki/Consumer-Requirements.md
index 22c2f4a..0c35c27 100644
--- a/docs/wiki/Consumer-Requirements.md
+++ b/docs/wiki/Consumer-Requirements.md
@@ -1,10 +1,5 @@
# Consumer Requirements
-> **Experimental.** `Purview.Containers.*` is an experimental project: the public API, the
-> defaults and these requirements can change between prereleases, and there is no production
-> support guarantee. Treat every version as a preview and pin the exact package version you build
-> against.
-
The WSL Containers backend package is **multi-target**. It ships Windows builds
(`net10.0-windows10.0.19041.0` and `net11.0-windows10.0.19041.0`, the implementations, built on the
`Microsoft.WSL.Containers` projection) and platform-neutral builds (`net10.0` and `net11.0`, facades). A
@@ -35,7 +30,7 @@ for operation deadlines, resource ownership and native cancellation limits.
| `Purview.Containers.Wsl` | `net10.0`, `net11.0`, `net10.0-windows10.0.19041.0` and `net11.0-windows10.0.19041.0` | The WSL Containers backend: portable facades plus the Windows implementations. **The requirements on this page are its contract.** |
| `Purview.Containers.Docker` | `net10.0` and `net11.0`, any platform | The Docker backend (Testcontainers). Needs a reachable Docker daemon, not a Windows target framework. |
| `Purview.Containers.Environment` | `net10.0` and `net11.0`, any platform | Standalone Docker-compatible CLI bind-sharing resolver; no Aspire, Testcontainers or WSLC dependency. |
-| `Purview.Containers.Aspire` | `net10.0` and `net11.0`, any platform | Optional adapter requiring Aspire 13.6.5+ and the Environment package; no backend dependency. |
+| `Purview.Containers.Aspire` | `net10.0` and `net11.0`, any platform | Optional adapter requiring Aspire 17.0.0+ and the Environment package; no backend dependency. |
The standalone resolver requires a reachable Linux-container daemon through its selected CLI, working
credential helpers on `PATH`, and client write access to bind-source directories for verification markers.
@@ -180,8 +175,8 @@ runs on WSLC locally and Docker in CI with no further configuration:
net10.0
-
-
+
+
```
@@ -269,7 +264,7 @@ unconditionally — every inner build is supported:
net10.0;net11.0;net10.0-windows10.0.19041.0
-
+
```
diff --git a/docs/wiki/Contributing.md b/docs/wiki/Contributing.md
index b5160b2..a9a762a 100644
--- a/docs/wiki/Contributing.md
+++ b/docs/wiki/Contributing.md
@@ -7,9 +7,10 @@ request.
- Windows with **WSL Containers** for integration tests; see [Getting Started](Getting-Started.md).
- .NET SDK 11 (pinned in `global.json` as `11.0.100`).
-- The library projects split by framework: Purview.BuildSdk's `Current` target-framework set gives the
- backend-neutral abstractions and the service modules `net10.0;net11.0` (the `net11.0` build adds
- `runtime-async=on` and the C# 15 updated memory-safety rules).
+- The library projects split by framework: Purview.BuildSdk's `Supported` target-framework set
+ (selected in `src/Directory.Build.props`) gives the backend-neutral abstractions and the service
+ modules `net10.0;net11.0` (the `net11.0` build adds `runtime-async=on` and the C# 15 updated
+ memory-safety rules, both opted into explicitly in `src/Directory.Build.props`).
`src/src/Wsl/Wsl.csproj` is multi-target (`net10.0`/`net11.0` facades plus
`net10.0-windows10.0.19041.0`/`net11.0-windows10.0.19041.0` implementations) because the WSL Containers
projection is Windows-only. `src/tests` pins the same set to
diff --git a/docs/wiki/Getting-Started.md b/docs/wiki/Getting-Started.md
index 138fec3..5490802 100644
--- a/docs/wiki/Getting-Started.md
+++ b/docs/wiki/Getting-Started.md
@@ -24,9 +24,6 @@ Everything runs on one of two backends; pick the one that matches your machine
- The full consumer contract, every error, and the `EnableWindowsTargeting` workaround for non-Windows CI
agents live in [Consumer Requirements](Consumer-Requirements.md).
-> **Experimental.** The API, defaults and packaging rules can change between prereleases; there is no
-> production support guarantee.
-
## 1. Reference a package
| Package | Use it when |
diff --git a/docs/wiki/Home.md b/docs/wiki/Home.md
index 3891366..0582862 100644
--- a/docs/wiki/Home.md
+++ b/docs/wiki/Home.md
@@ -9,11 +9,6 @@ capabilities the SDK does not expose. See [Capabilities and Cancellation](Backen
This wiki is the project documentation hub. The packages are published under the
`Purview.Containers.*` package IDs.
-> **Experimental.** This project is an experiment in running throwaway containers through Microsoft
-> WSL Containers. The public API, defaults and packaging rules can change between prereleases, and
-> there is no production support guarantee. Pin the exact package version you build against and read
-> [Consumer Requirements](Consumer-Requirements.md) before adopting it.
-
## Start here
- [Getting Started](Getting-Started.md)
diff --git a/docs/wiki/Release-Flow.md b/docs/wiki/Release-Flow.md
index 924363c..05d95f8 100644
--- a/docs/wiki/Release-Flow.md
+++ b/docs/wiki/Release-Flow.md
@@ -9,9 +9,9 @@ applies that value to `Version` and `PackageVersion` for every project, so a rel
bump — never a manual project-file edit. `package.json` also carries the repository, homepage and issue URLs
that end up in each nuspec.
-The project is **experimental**, so versions stay on a `-prerelease.N` suffix: consumers should pin an
-exact version rather than float, and each bump can change the API or the
-[consumer requirements](Consumer-Requirements.md).
+Versions use a `-prerelease.N` suffix until the stable 1.0.0 release, which will include the WSL Containers
+backend. Until then, consumers should pin an exact version rather than float, and each bump can change
+the API or the [consumer requirements](Consumer-Requirements.md).
## Local commands
@@ -48,8 +48,9 @@ the run with the failing module's output.
## GitHub Actions
-- `.github/workflows/pr.yml` — pull requests build and test via the shared
- `purview-dev/build/.github/workflows/purview-build.yml`, with pack and validation enabled.
+- `.github/workflows/pr.yml` — pull requests **and every push to `main`** build and test via the shared
+ `purview-dev/build/.github/workflows/purview-build.yml`, with pack and validation enabled, plus the
+ Docker and WSLC contract jobs. A push to `main` builds only; it never publishes.
- `.github/workflows/release.yml` — a push to a **`release/**` branch** (or a manual `workflow_dispatch`)
calls `purview-dev/build/.github/workflows/purview-release.yml` with `release-mode: NuGet`. It evaluates
release eligibility and, when eligible, builds, tests, packs, publishes to NuGet and creates the
diff --git a/docs/wiki/Testing.md b/docs/wiki/Testing.md
index b136e2f..4d781a8 100644
--- a/docs/wiki/Testing.md
+++ b/docs/wiki/Testing.md
@@ -109,7 +109,8 @@ the workflow adds `C:\Program Files\WSL` and calls it by absolute path.
Coverage is split for cost:
-- **Every pull request**: `pr.yml` runs `Wsl.IntegrationTests` on `windows-2025` (the contract suite).
+- **Every pull request and push to `main`**: `pr.yml` runs `Wsl.IntegrationTests` on `windows-2025`
+ (the contract suite).
- **Nightly**: `.github/workflows/integration-wsl.yml` runs the contract suite and the nine service-module
suites on `windows-2025`, one project at a time.
- **On demand**: the same workflow accepts `runner: self-hosted` to use a warm self-hosted Windows runner
diff --git a/docs/wiki/Using-in-Your-Tests.md b/docs/wiki/Using-in-Your-Tests.md
index ffc4dd4..8d7364c 100644
--- a/docs/wiki/Using-in-Your-Tests.md
+++ b/docs/wiki/Using-in-Your-Tests.md
@@ -13,10 +13,10 @@ a Mac) — nothing changes between them.
-
-
+
+
-
+
```
diff --git a/global.json b/global.json
index a12bdeb..4a0ba47 100644
--- a/global.json
+++ b/global.json
@@ -5,7 +5,7 @@
"allowPrerelease": false
},
"msbuild-sdks": {
- "Purview.BuildSdk": "2.0.0"
+ "Purview.BuildSdk": "2.2.0"
},
"test": {
"runner": "Microsoft.Testing.Platform"
diff --git a/package.json b/package.json
index 913bebf..5c0a180 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "containers",
- "version": "1.0.0-prerelease.13",
+ "version": "1.0.0-prerelease.14",
"description": "Testcontainers-style library for .NET that runs throwaway Linux containers for integration testing, on Microsoft WSL Containers or Docker.",
"license": "MIT",
"author": {
diff --git a/samples/getting-started/AutoSample/AutoSample.csproj b/samples/getting-started/AutoSample/AutoSample.csproj
index 4b7fd83..52c2d7b 100644
--- a/samples/getting-started/AutoSample/AutoSample.csproj
+++ b/samples/getting-started/AutoSample/AutoSample.csproj
@@ -22,6 +22,23 @@
+
+
+
+
+
+ Supported
<_PurviewIsTestSubtree
Condition="$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace('\', '/').Contains('/src/tests/'))"
>true
- net11.0-windows10.0.19041.0
+ net11.0-windows10.0.19041.0
+
+ true
+ 2
x64
10.0.26100.80
true
@@ -29,10 +48,10 @@
purview-logo-light.png
README.md
-
- https://github.com/purview-dev/containers
+
+ https://purview.dev/projects/containers/
diff --git a/src/src/Aspire/Sdk/README.md b/src/src/Aspire/Sdk/README.md
index 006112e..7b5ce60 100644
--- a/src/src/Aspire/Sdk/README.md
+++ b/src/src/Aspire/Sdk/README.md
@@ -1,7 +1,5 @@
# Purview.Containers.Aspire
-> **Experimental.** Pin the exact prerelease version; the API and defaults may change.
-
Apply verified container bind-source resolution to any Aspire AppHost.
```csharp
diff --git a/src/src/AzureKeyVaultEmulator/Sdk/README.md b/src/src/AzureKeyVaultEmulator/Sdk/README.md
index 6c92a28..dda336a 100644
--- a/src/src/AzureKeyVaultEmulator/Sdk/README.md
+++ b/src/src/AzureKeyVaultEmulator/Sdk/README.md
@@ -24,8 +24,6 @@ container can hand out clients that are already wired for the emulator.
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any
platform. No Windows target framework and no `PCC` guards apply.
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
- The emulator is not a replacement for Azure Key Vault; it exists to make developing against it easier.
## Quick start
diff --git a/src/src/AzureServiceBusEmulator/Sdk/README.md b/src/src/AzureServiceBusEmulator/Sdk/README.md
index f66688b..9954da7 100644
--- a/src/src/AzureServiceBusEmulator/Sdk/README.md
+++ b/src/src/AzureServiceBusEmulator/Sdk/README.md
@@ -28,8 +28,6 @@ its state in SQL Server), and needs a backend package (`Purview.Containers.Wsl`
which is x64 only and needs at least 2000 MB of memory in the WSLC session VM or Docker host. On ARM64,
`WithSqlServerImage("mcr.microsoft.com/azure-sql-edge:latest")` is an alternative the emulator supports.
SQL Server 2022 does not start on WSLC (it fails to create `/.system` as the non-root `mssql` user).
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
- The emulator is for local development and testing only; it is not a replacement for Azure Service Bus.
## Quick start
diff --git a/src/src/Azurite/Sdk/README.md b/src/src/Azurite/Sdk/README.md
index 4f9e232..0519b27 100644
--- a/src/src/Azurite/Sdk/README.md
+++ b/src/src/Azurite/Sdk/README.md
@@ -22,8 +22,6 @@ See the [Getting Started guide](https://github.com/purview-dev/containers/blob/m
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any
platform. No Windows target framework and no `PCC` guards apply.
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
## Quick start
diff --git a/src/src/Containers/Sdk/README.md b/src/src/Containers/Sdk/README.md
index b16e3cb..8e27633 100644
--- a/src/src/Containers/Sdk/README.md
+++ b/src/src/Containers/Sdk/README.md
@@ -67,6 +67,3 @@ not change.
- [Using it in your tests (auto)](https://github.com/purview-dev/containers/blob/main/docs/wiki/Using-in-Your-Tests.md)
- [Backends: WSLC or Docker](https://github.com/purview-dev/containers/blob/main/docs/wiki/Backends.md)
- [Modules](https://github.com/purview-dev/containers/blob/main/docs/wiki/Modules.md)
-
-> **Experimental.** The public API, defaults and packaging rules can change between prereleases; there is
-> no production support guarantee.
\ No newline at end of file
diff --git a/src/src/Core/Sdk/README.md b/src/src/Core/Sdk/README.md
index c5d9232..1c9a564 100644
--- a/src/src/Core/Sdk/README.md
+++ b/src/src/Core/Sdk/README.md
@@ -87,6 +87,3 @@ callers that want to apply their own policy.
- [Purview.Containers.Wsl](https://www.nuget.org/packages/Purview.Containers.Wsl) — WSL Containers backend.
- Documentation wiki: .
-
-> **Experimental.** The public API, defaults and packaging rules can change between prereleases, and
-> there is no production support guarantee. Pin the exact package version you build against.
diff --git a/src/src/Directory.Build.props b/src/src/Directory.Build.props
index 80c534b..84b0486 100644
--- a/src/src/Directory.Build.props
+++ b/src/src/Directory.Build.props
@@ -6,8 +6,9 @@
net10.0 and net11.0: .NET 10 is the lowest consumer that is still supported (.NET 8 and .NET 9
are deliberately dropped), and the net11.0 build lets a .NET 11 consumer bind the .NET 11
assembly instead (runtime-async compilation, .NET 11 library APIs and C# 15 features). That list
- is Purview.BuildSdk's `Current` target-framework set - the default when a project declares no
- target of its own - so this file must not restate it. Only the WSL Containers backend is
+ is Purview.BuildSdk's `Supported` target-framework set, selected in the parent
+ src/Directory.Build.props for every project that declares no target of its own, so this file
+ must not restate it. Only the WSL Containers backend is
Windows-only, so it adds its own Windows target frameworks in its project file.
The parent Directory.Build.props still owns the repo-wide identity (NamespacePrefix), the SDK
diff --git a/src/src/Docker/DockerContainer.cs b/src/src/Docker/DockerContainer.cs
index f722fb1..b70c2a2 100644
--- a/src/src/Docker/DockerContainer.cs
+++ b/src/src/Docker/DockerContainer.cs
@@ -1,6 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
-using DotNet.Testcontainers.Configurations;
using Purview.Containers.Runtime;
using Purview.Containers.Waiting;
using TcContainer = DotNet.Testcontainers.Containers.IContainer;
@@ -151,9 +150,7 @@ public async Task ExecAsync(
// Testcontainers' argv overload cannot supply exec settings and logs argv. Send environment
// separately through its Docker client transport rather than embedding secrets in a shell command.
- using var client = TestcontainersSettings
- .OS.DockerEndpointAuthConfig.GetDockerClientBuilder(Guid.NewGuid())
- .Build();
+ using var client = DockerEndpoint.CreateClient();
var created = await client
.Exec.CreateContainerExecAsync(
Handle.Id,
@@ -353,9 +350,7 @@ public async Task DeleteAsync(CancellationToken cancellationToken = default)
deadline.Token.ThrowIfCancellationRequested();
if (_handle is not null && !_deleted)
{
- using var client = TestcontainersSettings
- .OS.DockerEndpointAuthConfig.GetDockerClientBuilder(Guid.NewGuid())
- .Build();
+ using var client = DockerEndpoint.CreateClient();
try
{
await client
@@ -398,9 +393,7 @@ public async Task WaitForExitAsync(CancellationToken cancellationToken = d
async Task ObserveExitAsync()
{
- using var client = TestcontainersSettings
- .OS.DockerEndpointAuthConfig.GetDockerClientBuilder(Guid.NewGuid())
- .Build();
+ using var client = DockerEndpoint.CreateClient();
var result = await client.Containers.WaitContainerAsync(Handle.Id, _lifetime.Token).ConfigureAwait(false);
return result.StatusCode;
}
diff --git a/src/src/Docker/DockerContainerBackend.cs b/src/src/Docker/DockerContainerBackend.cs
index 54b2192..40a7b60 100644
--- a/src/src/Docker/DockerContainerBackend.cs
+++ b/src/src/Docker/DockerContainerBackend.cs
@@ -46,14 +46,20 @@ public IContainer CreateContainer(IContainerConfiguration configuration)
///
public async Task GetInfoAsync(CancellationToken cancellationToken = default)
{
+ var probeTimeout = TimeSpan.FromSeconds(10);
using var deadline = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
- deadline.CancelAfter(TimeSpan.FromSeconds(10));
+ deadline.CancelAfter(probeTimeout);
+
+ // Testcontainers reports "no daemon discovered" as a null endpoint, not an exception.
+ var endpoint = DockerEndpoint.TryResolve();
+ if (endpoint is null)
+ {
+ return Unavailable(DockerEndpoint.NotFoundMessage);
+ }
+
try
{
- // Resolving the endpoint throws when no Docker environment can be discovered, and the ping
- // throws when the daemon is not running; both are reported as "unavailable" with the reason.
- var endpoint = TestcontainersSettings.OS.DockerEndpointAuthConfig;
- using var client = endpoint.GetDockerClientBuilder(Guid.NewGuid()).Build();
+ using var client = DockerEndpoint.CreateClient(endpoint);
await client.System.PingAsync(deadline.Token).ConfigureAwait(false);
var info = await client.System.GetSystemInfoAsync(deadline.Token).ConfigureAwait(false);
return new ContainerBackendInfo(
@@ -64,16 +70,23 @@ public async Task GetInfoAsync(CancellationToken cancellat
[]
);
}
+ catch (OperationCanceledException) when (!cancellationToken.IsCancellationRequested)
+ {
+ return Unavailable(
+ $"The Docker daemon at {endpoint.Endpoint} did not respond within {probeTimeout.TotalSeconds:0} seconds. "
+ + "Check that it is running and reachable, or point DOCKER_HOST at a running daemon."
+ );
+ }
catch (Exception exception) when (!cancellationToken.IsCancellationRequested)
{
- return new ContainerBackendInfo(
- Name,
- IsAvailable: false,
- IsCompatible: false,
- Version: string.Empty,
- MissingComponents: [$"{exception.GetType().Name}: {exception.Message}"]
+ return Unavailable(
+ $"The Docker daemon at {endpoint.Endpoint} could not be reached ({exception.GetType().Name}: {exception.Message}). "
+ + "Check that it is running, or point DOCKER_HOST at a running daemon."
);
}
+
+ ContainerBackendInfo Unavailable(string reason) =>
+ new(Name, IsAvailable: false, IsCompatible: false, Version: string.Empty, MissingComponents: [reason]);
}
///
@@ -146,8 +159,7 @@ CancellationToken cancellationToken
cancellationToken.ThrowIfCancellationRequested();
if (configuration.RegistryCredentials is { } credentials && configuration.PullPolicy != Images.PullPolicy.Never)
{
- var endpoint = TestcontainersSettings.OS.DockerEndpointAuthConfig;
- using var client = endpoint.GetDockerClientBuilder(Guid.NewGuid()).Build();
+ using var client = DockerEndpoint.CreateClient();
var pull = configuration.PullPolicy == Images.PullPolicy.Always;
if (!pull)
{
diff --git a/src/src/Docker/DockerEndpoint.cs b/src/src/Docker/DockerEndpoint.cs
new file mode 100644
index 0000000..3aa702e
--- /dev/null
+++ b/src/src/Docker/DockerEndpoint.cs
@@ -0,0 +1,34 @@
+using DotNet.Testcontainers.Configurations;
+using Purview.Containers.Runtime;
+
+namespace Purview.Containers.Docker;
+
+///
+/// The single place the Docker backend resolves Testcontainers' daemon endpoint. Testcontainers returns
+/// (rather than throwing) when none of its discovery providers finds a daemon,
+/// so every caller would otherwise fail with a bare ; this turns that
+/// into a that says what to fix.
+///
+static class DockerEndpoint
+{
+ internal const string NotFoundMessage =
+ "No Docker daemon was found. Start a Docker-compatible engine (Docker Desktop, Docker Engine, "
+ + "Rancher Desktop or Podman), or point DOCKER_HOST (or docker.host in ~/.testcontainers.properties) "
+ + "at a running daemon.";
+
+ /// Resolves the daemon endpoint, or throws a .
+ internal static IDockerEndpointAuthenticationConfiguration Resolve() =>
+ TryResolve() ?? throw new ContainerBackendUnavailableException(NotFoundMessage);
+
+ /// Resolves the daemon endpoint, or returns when none was discovered.
+ internal static IDockerEndpointAuthenticationConfiguration? TryResolve() =>
+ TestcontainersSettings.OS?.DockerEndpointAuthConfig;
+
+ /// Creates a Docker client for the resolved endpoint.
+ internal static global::Docker.DotNet.DockerClient CreateClient() => CreateClient(Resolve());
+
+ /// Creates a Docker client for .
+ internal static global::Docker.DotNet.DockerClient CreateClient(
+ IDockerEndpointAuthenticationConfiguration endpoint
+ ) => endpoint.GetDockerClientBuilder(Guid.NewGuid()).Build();
+}
diff --git a/src/src/Docker/DockerFileCopy.cs b/src/src/Docker/DockerFileCopy.cs
index e92d0f8..768725d 100644
--- a/src/src/Docker/DockerFileCopy.cs
+++ b/src/src/Docker/DockerFileCopy.cs
@@ -1,5 +1,3 @@
-using DotNet.Testcontainers.Configurations;
-
namespace Purview.Containers.Docker;
static class DockerFileCopy
@@ -15,9 +13,7 @@ CancellationToken cancellationToken
using var archive = await ContainerResourceArchive
.CreateAsync(source, target, mode, cancellationToken)
.ConfigureAwait(false);
- using var client = TestcontainersSettings
- .OS.DockerEndpointAuthConfig.GetDockerClientBuilder(Guid.NewGuid())
- .Build();
+ using var client = DockerEndpoint.CreateClient();
await client
.Containers.ExtractArchiveToContainerAsync(
id,
diff --git a/src/src/Docker/DockerVolumeCleanup.cs b/src/src/Docker/DockerVolumeCleanup.cs
index 65585bd..8971804 100644
--- a/src/src/Docker/DockerVolumeCleanup.cs
+++ b/src/src/Docker/DockerVolumeCleanup.cs
@@ -1,7 +1,6 @@
using System.Collections.Concurrent;
using System.Net;
using Docker.DotNet.Models;
-using DotNet.Testcontainers.Configurations;
using Purview.Containers.Mounts;
namespace Purview.Containers.Docker;
@@ -167,6 +166,5 @@ static void EnsureProcessExitHook()
};
}
- static global::Docker.DotNet.DockerClient CreateClient() =>
- TestcontainersSettings.OS.DockerEndpointAuthConfig.GetDockerClientBuilder(Guid.NewGuid()).Build();
+ static global::Docker.DotNet.DockerClient CreateClient() => DockerEndpoint.CreateClient();
}
diff --git a/src/src/Docker/Sdk/README.md b/src/src/Docker/Sdk/README.md
index 878d074..a6d3024 100644
--- a/src/src/Docker/Sdk/README.md
+++ b/src/src/Docker/Sdk/README.md
@@ -69,6 +69,3 @@ PURVIEW_CONTAINERS_BACKEND=docker # or "auto" (the default) to probe WSLC fi
store and bind mounts are untouched.
- Log tailing polls the accumulated output until the container stops, because the Testcontainers API
exposes no positioned log stream.
-
-> **Experimental.** The public API, defaults and packaging rules can change between prereleases, and
-> there is no production support guarantee. Pin the exact package version you build against.
diff --git a/src/src/Docker/WslDockerHost.cs b/src/src/Docker/WslDockerHost.cs
index a1fa43b..30141f2 100644
--- a/src/src/Docker/WslDockerHost.cs
+++ b/src/src/Docker/WslDockerHost.cs
@@ -1,7 +1,6 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Text;
-using DotNet.Testcontainers.Configurations;
namespace Purview.Containers.Docker;
@@ -43,13 +42,14 @@ internal string Resolve(string path)
internal static WslDockerHost? Detect()
{
- var endpoint = TestcontainersSettings.OS.DockerEndpointAuthConfig;
- if (!OperatingSystem.IsWindows() || !IsLocalTcp(endpoint.Endpoint))
+ // No discovered daemon means there is nothing to translate for; starting a container reports it.
+ var endpoint = DockerEndpoint.TryResolve();
+ if (endpoint is null || !OperatingSystem.IsWindows() || !IsLocalTcp(endpoint.Endpoint))
{
return null;
}
- using var client = endpoint.GetDockerClientBuilder(Guid.NewGuid()).Build();
+ using var client = DockerEndpoint.CreateClient(endpoint);
using CancellationTokenSource timeout = new(TimeSpan.FromSeconds(5));
var info = client.System.GetSystemInfoAsync(timeout.Token).ConfigureAwait(false).GetAwaiter().GetResult();
var distribution = FindDistribution(endpoint.Endpoint, info.KernelVersion, info.OperatingSystem, info.ID, Run);
diff --git a/src/src/Environment/Sdk/README.md b/src/src/Environment/Sdk/README.md
index 505afed..a6ca33c 100644
--- a/src/src/Environment/Sdk/README.md
+++ b/src/src/Environment/Sdk/README.md
@@ -1,7 +1,5 @@
# Purview.Containers.Environment
-> **Experimental.** Pin the exact prerelease version; the API and defaults may change.
-
Resolve client-side bind sources against a Docker-compatible daemon without assuming the daemon
runs on the client machine. This library has no Aspire or AspireC4 dependency.
diff --git a/src/src/MsSql/Sdk/README.md b/src/src/MsSql/Sdk/README.md
index f0f4b7d..ab2572d 100644
--- a/src/src/MsSql/Sdk/README.md
+++ b/src/src/MsSql/Sdk/README.md
@@ -21,8 +21,6 @@ connection-string generation and readiness probing.
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any
platform. No Windows target framework and no `PCC` guards apply.
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
## Quick start
diff --git a/src/src/MySql/Sdk/README.md b/src/src/MySql/Sdk/README.md
index bd02535..fd72a58 100644
--- a/src/src/MySql/Sdk/README.md
+++ b/src/src/MySql/Sdk/README.md
@@ -21,8 +21,6 @@ connection-string generation.
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any
platform. No Windows target framework and no `PCC` guards apply.
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
## Quick start
diff --git a/src/src/Nats/Sdk/README.md b/src/src/Nats/Sdk/README.md
index eda60d5..e22ea31 100644
--- a/src/src/Nats/Sdk/README.md
+++ b/src/src/Nats/Sdk/README.md
@@ -21,8 +21,6 @@ package — bring your own client.
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any
platform. No Windows target framework and no `PCC` guards apply.
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
## Quick start
diff --git a/src/src/PostgreSql/Sdk/README.md b/src/src/PostgreSql/Sdk/README.md
index 68af22c..fef7ef2 100644
--- a/src/src/PostgreSql/Sdk/README.md
+++ b/src/src/PostgreSql/Sdk/README.md
@@ -21,8 +21,6 @@ See the [Getting Started guide](https://github.com/purview-dev/containers/blob/m
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any
platform. No Windows target framework and no `PCC` guards apply.
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
## Quick start
diff --git a/src/src/RabbitMq/Sdk/README.md b/src/src/RabbitMq/Sdk/README.md
index e5ec9ed..0473edb 100644
--- a/src/src/RabbitMq/Sdk/README.md
+++ b/src/src/RabbitMq/Sdk/README.md
@@ -21,8 +21,6 @@ bring your own client.
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any
platform. No Windows target framework and no `PCC` guards apply.
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
## Quick start
diff --git a/src/src/Redis/Sdk/README.md b/src/src/Redis/Sdk/README.md
index 76c9740..9e8050b 100644
--- a/src/src/Redis/Sdk/README.md
+++ b/src/src/Redis/Sdk/README.md
@@ -21,8 +21,6 @@ package — bring your own client.
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any
platform. No Windows target framework and no `PCC` guards apply.
-- **Experimental:** the API, defaults and packaging can change between prereleases; there is no
- production support guarantee.
## Quick start
diff --git a/src/src/Wsl/Sdk/README.md b/src/src/Wsl/Sdk/README.md
index 52eb8aa..0aeae56 100644
--- a/src/src/Wsl/Sdk/README.md
+++ b/src/src/Wsl/Sdk/README.md
@@ -44,8 +44,6 @@ consuming assembly. To also run the same test code on Docker in Linux CI, refere
[consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md).
- Verify the host with `wsl --version` and `wslc version`. The library never installs or updates WSL
itself; `WslContainerRuntime.GetInfoAsync()` reports what is missing.
-- **Experimental:** this is an experiment in driving WSL Containers. The public API, defaults and
- packaging rules can change between prereleases, and there is no production support guarantee.
## Quick start
diff --git a/src/src/Wsl/Wsl.csproj b/src/src/Wsl/Wsl.csproj
index 39aefdc..866d048 100644
--- a/src/src/Wsl/Wsl.csproj
+++ b/src/src/Wsl/Wsl.csproj
@@ -19,9 +19,17 @@
platform-neutral consumer gets the facade. The approach rests on the extracted and tested
result that the WSLC projection is a net8.0-windows asset loadable by a net10.0 or net11.0
process.
+
+ The list is derived from Purview.BuildSdk's `Supported` set (selected in src/Directory.Build.props)
+ rather than restated: each supported framework contributes its portable build and its
+ -windows10.0.19041.0 build, so this package always targets exactly what the other packages do.
+ The payload target below and the pack manifest still name net10.0 (the lowest supported build)
+ and fail fast if the set moves.
-->
- net10.0;net10.0-windows10.0.19041.0;net11.0;net11.0-windows10.0.19041.0
+
+ $(PurviewTargetFrameworksSupported);$([MSBuild]::Unescape($(PurviewTargetFrameworksSupported.Replace(';', '-windows10.0.19041.0;'))))-windows10.0.19041.0
WSL Containers (WSLC) backend for Purview.Containers: run WSLC-native throwaway Linux containers from any .NET 10 or .NET 11 project, with automatic Docker fallback.
wsl;wslc;containers;linux;windows;testing;integration;testcontainers
MIT
diff --git a/src/tests/Wsl.UnitTests/BuildFeatureTests.cs b/src/tests/Wsl.UnitTests/BuildFeatureTests.cs
index 761cceb..cb8c103 100644
--- a/src/tests/Wsl.UnitTests/BuildFeatureTests.cs
+++ b/src/tests/Wsl.UnitTests/BuildFeatureTests.cs
@@ -5,13 +5,18 @@ namespace Purview.Containers.Wsl;
///
/// Guards the build shape of the net11.0 assembly documented in
-/// docs/wiki/Consumer-Requirements.md. The net11.0 build is compiled with
-/// runtime-async=on (Purview.BuildSdk's PurviewRuntimeAsync default), which removes the
-/// compiler-generated state machines: async methods carry no ,
-/// the runtime tracks suspension instead, and live stack traces name the real methods.
+/// docs/wiki/Consumer-Requirements.md. Purview.BuildSdk 2.2.0 makes both .NET 11 features
+/// opt-in, so src/Directory.Build.props enables them explicitly; these tests fail if that
+/// opt-in is lost.
///
public class BuildFeatureTests
{
+ ///
+ /// PurviewRuntimeAsync=true compiles with runtime-async=on, which removes the
+ /// compiler-generated state machines: async methods carry no
+ /// , the runtime tracks suspension instead, and live stack
+ /// traces name the real methods.
+ ///
[Test]
public async Task Net11AssemblyUsesRuntimeAsync()
{
@@ -21,4 +26,20 @@ public async Task Net11AssemblyUsesRuntimeAsync()
await Assert.That(stateMachine).IsNull();
}
+
+ ///
+ /// MemorySafetyRules=2 compiles with the C# 15 updated-memory-safety-rules feature,
+ /// which marks the module with MemorySafetyRulesAttribute.
+ ///
+ [Test]
+ public async Task Net11AssemblyUsesUpdatedMemorySafetyRules()
+ {
+ var assembly = typeof(WslContainer).Assembly;
+ var marked = assembly
+ .ManifestModule.GetCustomAttributesData()
+ .Concat(assembly.GetCustomAttributesData())
+ .Any(a => a.AttributeType.Name == "MemorySafetyRulesAttribute");
+
+ await Assert.That(marked).IsTrue();
+ }
}