Purview.Containers.Docker 1.0.0-prerelease.5

This is a prerelease version of Purview.Containers.Docker.
dotnet add package Purview.Containers.Docker --version 1.0.0-prerelease.5
                    
NuGet\Install-Package Purview.Containers.Docker -Version 1.0.0-prerelease.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Purview.Containers.Docker" Version="1.0.0-prerelease.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Purview.Containers.Docker" Version="1.0.0-prerelease.5" />
                    
Directory.Packages.props
<PackageReference Include="Purview.Containers.Docker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Purview.Containers.Docker --version 1.0.0-prerelease.5
                    
#r "nuget: Purview.Containers.Docker, 1.0.0-prerelease.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Purview.Containers.Docker@1.0.0-prerelease.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Purview.Containers.Docker&version=1.0.0-prerelease.5&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Purview.Containers.Docker&version=1.0.0-prerelease.5&prerelease
                    
Install as a Cake Tool

Purview.Containers.Docker

The Docker backend for Purview.Containers.Core: throwaway containers for integration testing on any Docker daemon reachable from the test host — Docker Desktop, Docker Engine inside WSL2, a remote daemon, Docker-in-Docker, or the daemon a CI runner provides. It drives the daemon through Testcontainers for .NET.

dotnet add package Purview.Containers.Docker
await using var container = new ContainerBuilder()
    .WithImage("alpine:3.19")
    .WithCommand("/bin/sh", "-c", "echo ready && sleep 30")
    .WithWaitStrategy(Wait.ForLogMessage("ready"))
    .Build();

await container.StartAsync();
var result = await container.ExecAsync(["/bin/echo", "hello"]);

Referencing this package makes docker selectable; the module packages need no Docker-specific variant, because a module reaches the backend through the shared abstractions:

PURVIEW_CONTAINERS_BACKEND=docker     # or "auto" (the default) to probe WSLC first, then Docker
Rule How
Pinned instance ContainerBackends.Use(new DockerContainerBackend()), or WithBackend(...)
Named backend PURVIEW_CONTAINERS_BACKEND=docker
Automatic detection probe every registered backend; WSLC is preferred when it is usable

Requirements

  • .NET 10 or later, any platform (this package is portable).
  • A reachable Docker daemon. DockerContainerBackend.GetInfoAsync() pings it and reports the server version, or the reason it could not be reached, so a missing daemon is a clear message and not a timeout deep inside a test.
  • The daemon must accept the standard Testcontainers configuration (DOCKER_HOST, Docker contexts, ~/.testcontainers.properties). The resource reaper (Ryuk) is used, so a crashed test host does not leak containers.

Behaviour notes

  • Readiness uses the same shared wait strategies as every other backend (host TCP/HTTP, an in-container command, or a log match), so module behaviour does not change with the backend.
  • ExecAsync supports WorkingDirectory and Timeout; Environment and EnableStandardInput throw ContainerNotSupportedException rather than being silently ignored.
  • 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.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Purview.Containers.Docker:

Package Downloads
Purview.Containers

Purview.Containers: the umbrella package. Brings the abstractions (Purview.Containers.Core) and both backends (WSL Containers and Docker), so one reference runs the same tests on WSLC on Windows and Docker everywhere else.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-prerelease.5 34 10/2/2026
1.0.0-prerelease.4 37 10/2/2026
1.0.0-prerelease.3 34 10/2/2026
1.0.0-prerelease.2 35 10/1/2026