Ductus.FluentDocker.MsTest 2.80.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ductus.FluentDocker.MsTest --version 2.80.0
                    
NuGet\Install-Package Ductus.FluentDocker.MsTest -Version 2.80.0
                    
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="Ductus.FluentDocker.MsTest" Version="2.80.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ductus.FluentDocker.MsTest" Version="2.80.0" />
                    
Directory.Packages.props
<PackageReference Include="Ductus.FluentDocker.MsTest" />
                    
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 Ductus.FluentDocker.MsTest --version 2.80.0
                    
#r "nuget: Ductus.FluentDocker.MsTest, 2.80.0"
                    
#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.
#addin nuget:?package=Ductus.FluentDocker.MsTest&version=2.80.0
                    
Install as a Cake Addin
#tool nuget:?package=Ductus.FluentDocker.MsTest&version=2.80.0
                    
Install as a Cake Tool

FluentDocker for MsTest

In addition to the standard FluentDocker usage, it adds the ability to use easy testing with containers via MsTest.

For example, fire up a Postgres container inside the test could look like this

[TestClass]
public class PostgresMsTests : PostgresTestBase
{
    [TestMethod]
    public void Test()
    {
          // We now have a running Postgres
          // and a valid connection string to use.
    }
}

This library enables docker and docker-compose interactions using a Fluent API. It is supported on Linux, Windows and Mac. It also has support for the legacy docker-machine interactions.

Have a look at the project site for more information.

Sample Fluent API usage

      using (
        var container =
          new Builder().UseContainer()
            .UseImage("kiasaki/alpine-postgres")
            .ExposePort(5432)
            .WithEnvironment("POSTGRES_PASSWORD=mysecretpassword")
            .WaitForPort("5432/tcp", 30000 /*30s*/)
            .Build()
            .Start())
      {
        var config = container.GetConfiguration(true);
        Assert.AreEqual(ServiceRunningState.Running, config.State.ToServiceState());
      }

The following snippet fires up Postgres and waits for it to be ready. It uses docker-compose file to perform the task.

      var file = Path.Combine(Directory.GetCurrentDirectory(),
        (TemplateString) "Resources/ComposeTests/WordPress/docker-compose.yml");

      // @formatter:off
      using (var svc = new Builder()
                        .UseContainer()
                        .UseCompose()
                        .FromFile(file)
                        .RemoveOrphans()
                        .WaitForHttp("wordpress", "http://localhost:8000/wp-admin/install.php") 
                        .Build().Start())
        // @formatter:on
      {
        // We now have a running WordPress with a MySql database        
        var installPage = await "http://localhost:8000/wp-admin/install.php".Wget();

        Assert.IsTrue(installPage.IndexOf("https://wordpress.org/", StringComparison.Ordinal) != -1);
        Assert.AreEqual(1, svc.Hosts.Count); // The host used by compose
        Assert.AreEqual(2, svc.Containers.Count); // We can access each individual container
        Assert.AreEqual(2, svc.Images.Count); // And the images used.
      }

👀 It has tons of features, including a low-level command style, services and finally, the Fluent API on top of it.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 (1)

Showing the top 1 popular GitHub repositories that depend on Ductus.FluentDocker.MsTest:

Repository Stars
IoTSharp/EntityFrameworkCore.Taos
EntityFramework, EF Core, ADO.NET, ORM,Stmt,TDengine
Version Downloads Last Updated
2.83.0 27 6/27/2025
2.82.0 30 6/27/2025
2.81.0 29 6/27/2025
2.80.0 31 6/27/2025
2.79.0 47 6/27/2025
2.10.59 73,571 1/11/2023
2.10.57 760 9/24/2022
2.10.56 3,444 8/24/2022
2.10.55 12,317 6/24/2022
2.10.54 494 6/24/2022
2.10.53 511 6/23/2022
2.10.51 1,214 6/7/2022
2.10.50 494 6/7/2022
2.10.48 2,167 5/30/2022
2.10.46 490 5/30/2022
2.10.45 14,389 3/9/2022
2.10.44 644 12/8/2021
2.10.42 3,470 11/24/2021
2.10.41 6,781 11/23/2021
2.10.40 1,114 10/27/2021
2.10.39 822 10/1/2021
2.10.35 462 10/1/2021
2.10.25 519 10/1/2021
2.10.23 530 10/1/2021
2.10.22 485 9/29/2021
2.10.21 528 9/19/2021
2.10.20 533 9/17/2021
2.10.19 516 9/16/2021
2.10.17 517 9/16/2021
2.10.16 514 9/15/2021
2.10.15 465 9/15/2021
2.10.14 548 9/14/2021
2.10.12 564 9/14/2021
2.10.10 570 9/13/2021
2.10.8 615 9/13/2021
2.10.7 1,271 6/11/2021
2.10.6 1,055 4/23/2021
2.10.5 582 4/20/2021
2.10.3 608 4/5/2021
2.10.2 557 3/28/2021
2.9.4 563 3/26/2021
2.9.3-beta.2 259 3/25/2021
2.8.14-beta.22 233 3/24/2021
2.8.13-beta.21 257 3/24/2021
2.8.12-beta.20 250 3/23/2021
2.8.11-beta.19 219 3/22/2021
2.8.10-beta.18 215 3/22/2021
2.8.9-beta.17 239 3/22/2021
2.8.8-beta.14 224 3/17/2021
2.8.7-beta.9 269 3/11/2021
2.8.5-beta.4 319 3/7/2021
2.8.5-beta.2 214 3/24/2021
2.8.4-beta.3 220 3/3/2021
2.8.3 594 3/24/2021
2.8.2 600 3/3/2021
2.7.80-beta.159 249 3/1/2021
2.7.71-beta.150 874 11/27/2020
2.7.69-beta.147 294 10/12/2020
2.7.68-beta.146 291 10/8/2020
2.7.66-beta.142 430 8/8/2020
2.7.65-beta.141 295 8/7/2020
2.7.64-beta.140 393 8/6/2020
2.7.62-beta.138 340 5/4/2020
2.7.60-beta.127 350 4/30/2020
2.7.59-beta0123 505 2/13/2020
2.7.58-beta0122 460 2/12/2020
2.7.54-beta0117 544 1/23/2020
2.7.53-beta0116 567 1/23/2020
2.7.52-beta0105 520 1/20/2020
2.7.51-beta0102 478 1/14/2020
2.7.50-beta0094 503 12/20/2019
2.7.49-beta0091 511 12/18/2019
2.7.48-beta0087 528 12/17/2019
2.7.47-beta0081 537 12/17/2019
2.7.46-beta0080 498 12/16/2019
2.7.45-beta0079 486 12/12/2019
2.7.44-beta0078 463 12/12/2019
2.7.42-beta0076 503 12/12/2019
2.7.41-beta0075 471 12/12/2019
2.7.38-beta0072 500 11/24/2019
2.7.37-beta0071 510 11/24/2019
2.7.36-beta0070 514 11/24/2019
2.7.35-beta0069 471 11/20/2019
2.7.34-beta0068 487 11/20/2019
2.7.33-beta0067 494 11/20/2019
2.7.32-beta0066 483 11/12/2019
2.7.31-beta0064 504 11/12/2019
2.7.30-beta0050 496 11/8/2019
2.7.29-beta0046 480 11/8/2019
2.7.28-beta0045 482 11/8/2019
2.7.27-beta0043 503 11/8/2019
2.7.22-devops-deploy-on0001 490 11/8/2019
2.7.21-devops-editorcon0003 488 11/8/2019
2.7.21-devops-editorcon0002 477 11/8/2019
2.7.21-devops-editorcon0001 479 11/8/2019
2.7.21-beta0036 473 11/8/2019
2.7.20-beta0032 493 11/8/2019
2.7.19-beta0030 478 11/8/2019
2.7.4-beta0001 495 11/8/2019
2.7.3 10,879 10/18/2019
2.7.2 862 9/10/2019
2.7.1 968 8/7/2019
2.7.0 804 8/6/2019
2.6.9 776 7/29/2019
2.6.8 810 5/31/2019
2.6.7 871 5/17/2019
2.6.6 929 4/11/2019
2.6.5 835 4/2/2019
2.6.4 2,372 12/6/2018
2.6.3 1,019 10/15/2018
2.6.2 996 10/3/2018
2.6.1 1,040 10/3/2018
2.6.0 1,076 10/2/2018
2.5.1 1,001 9/29/2018
2.5.0 1,015 9/29/2018
2.4.1 985 9/27/2018
2.4.0 1,049 9/18/2018
2.3.2 1,874 8/6/2018
2.3.1 1,113 7/20/2018
2.3.0 1,358 7/2/2018
2.2.19 1,330 6/27/2018
2.2.18 1,442 6/25/2018
2.2.17 1,380 6/15/2018
2.2.16 1,320 6/14/2018
2.2.15 1,439 6/7/2018
2.2.14 1,410 6/1/2018
2.2.13 1,337 5/22/2018
2.2.12 1,584 4/20/2018
2.2.11 1,262 4/18/2018
2.2.10 1,264 4/17/2018
2.2.9 1,480 4/6/2018
2.2.8 4,924 11/22/2017
2.2.7 1,289 11/22/2017
2.2.6 1,258 11/21/2017
2.2.5 1,268 11/9/2017
2.2.4 1,283 11/9/2017
2.2.3 1,351 8/25/2017
2.2.2 1,380 5/22/2017
2.2.1 1,361 4/6/2017
2.2.0 1,279 6/5/2016
2.1.1 1,215 5/27/2016
2.0.0 1,287 4/24/2016
1.1.4 1,211 3/31/2016
1.1.3 1,237 3/30/2016
1.1.2 1,217 3/30/2016
1.1.1 1,182 3/29/2016
1.1.0 1,254 3/29/2016
1.0.3 1,252 3/24/2016
1.0.2 1,655 3/23/2016
1.0.1 1,656 3/23/2016