FluentDocker.Testing.NUnit 3.0.1

dotnet add package FluentDocker.Testing.NUnit --version 3.0.1
                    
NuGet\Install-Package FluentDocker.Testing.NUnit -Version 3.0.1
                    
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="FluentDocker.Testing.NUnit" Version="3.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluentDocker.Testing.NUnit" Version="3.0.1" />
                    
Directory.Packages.props
<PackageReference Include="FluentDocker.Testing.NUnit" />
                    
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 FluentDocker.Testing.NUnit --version 3.0.1
                    
#r "nuget: FluentDocker.Testing.NUnit, 3.0.1"
                    
#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 FluentDocker.Testing.NUnit@3.0.1
                    
#: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=FluentDocker.Testing.NUnit&version=3.0.1
                    
Install as a Cake Addin
#tool nuget:?package=FluentDocker.Testing.NUnit&version=3.0.1
                    
Install as a Cake Tool

FluentDocker

CI NuGet Downloads License

Fluent API for managing Docker and Podman containers, images, networks, and volumes in .NET. Supports Docker CLI, Docker Engine API, Podman CLI, and Docker Compose. Runs on Linux, macOS, and Windows.

Installation

dotnet add package FluentDocker

Testing framework integration (pick one):

dotnet add package FluentDocker.Testing.Xunit
dotnet add package FluentDocker.Testing.NUnit
dotnet add package FluentDocker.Testing.MsTest

Quick Start

Docker CLI

using FluentDocker.Builders;
using FluentDocker.Kernel;

await using var kernel = FluentDockerKernel.Create()
    .WithDockerCli("docker", d => d.AsDefault())
    .Build();

await using var results = await new Builder()
    .WithinDriver("docker", kernel)
    .UseContainer(c => c
        .UseImage("postgres:15-alpine")
        .ExposePort("5432")
        .WithEnvironment("POSTGRES_PASSWORD", "mysecretpassword")
        .WaitForPort("5432/tcp", 30000))
    .BuildAsync();

var container = results.Containers.First();
// Container is running and ready to accept connections on port 5432

Docker Engine API (no CLI required)

await using var kernel = FluentDockerKernel.Create()
    .WithDockerApi("docker-api", d => d.AsDefault())
    .Build();

// Same builder API — just a different driver
await using var results = await new Builder()
    .WithinDriver("docker-api", kernel)
    .UseContainer(c => c
        .UseImage("redis:7-alpine")
        .ExposePort("6379")
        .WaitForPort("6379/tcp", 10000))
    .BuildAsync();

Podman

await using var kernel = FluentDockerKernel.Create()
    .WithPodmanCli("podman", d => d.AsDefault())
    .Build();

await using var results = await new Builder()
    .WithinDriver("podman", kernel)
    .UseContainer(c => c
        .UseImage("docker.io/library/nginx:alpine")
        .ExposePort("80"))
    .BuildAsync();

Docker Compose

await using var results = await new Builder()
    .WithinDriver("docker", kernel)
    .UseCompose(c => c
        .WithComposeFile("docker-compose.yml")
        .WithProjectName("myapp")
        .WithForceRecreate())
    .BuildAsync();

Networks and Volumes

await using var results = await new Builder()
    .WithinDriver("docker", kernel)
    .UseNetwork(n => n
        .WithName("my-net")
        .UseDriver("bridge")
        .WithSubnet("172.28.0.0/16")
        .RemoveOnDispose())
    .UseVolume(v => v
        .WithName("my-data")
        .UseDriver("local")
        .RemoveOnDispose())
    .UseContainer(c => c
        .UseImage("postgres:15-alpine")
        .WithNetwork("my-net")
        .WithVolume("my-data:/var/lib/postgresql/data"))
    .BuildAsync();

Features

  • Multi-driver kernel — run Docker CLI, Docker API, and Podman side by side
  • Fluent builder — containers, networks, volumes, compose, pods
  • Wait conditions — port, HTTP, process, log, health check, custom lambda
  • Async-first — all operations are async with CancellationToken support
  • Auto-cleanup — resources are disposed when the builder result is disposed
  • Testing integration — xUnit, NUnit, and MSTest fixtures with full lifecycle management
  • Security options — capabilities, read-only root, security-opt, user namespace
  • Cross-platform — Linux, macOS, Windows; .NET 8 and .NET 10

Documentation

Full documentation, architecture guides, and advanced examples are available at the project repository.

License

Apache 2.0

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.1 83 5/11/2026
3.0.0 74 5/11/2026
2.0.0 80 5/11/2026