Ductus.FluentDocker 2.85.0

FluentDocker

CI NuGet Downloads License

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.

No packages depend on Ductus.FluentDocker.

.NET 6.0

.NET 8.0

.NET Standard 2.0

Version Downloads Last updated
2.85.0 4 04/30/2026
2.84.0 4 04/30/2026
2.83.0 3 04/30/2026
2.82.0 2 04/30/2026
2.81.0 3 04/30/2026
2.80.0 2 04/30/2026
2.79.0 3 04/30/2026
2.10.59 5 04/29/2026
2.10.57 2 04/30/2026
2.10.56 4 04/30/2026
2.10.55 4 04/30/2026
2.10.54 2 04/30/2026
2.10.53 3 04/30/2026
2.10.51 3 04/30/2026
2.10.50 3 04/30/2026
2.10.48 4 04/30/2026
2.10.46 2 04/30/2026
2.10.45 3 04/30/2026
2.10.44 4 04/30/2026
2.10.42 2 04/30/2026
2.10.41 3 04/30/2026
2.10.40 3 04/30/2026
2.10.39 2 04/30/2026
2.10.35 2 04/30/2026
2.10.25 3 04/30/2026
2.10.23 3 04/30/2026
2.10.22 3 04/30/2026
2.10.21 3 04/30/2026
2.10.20 2 04/30/2026
2.10.19 3 04/30/2026
2.10.17 3 04/30/2026
2.10.16 3 04/30/2026
2.10.15 2 04/30/2026
2.10.14 2 04/30/2026
2.10.12 3 04/30/2026
2.10.10 2 04/30/2026
2.10.8 3 04/30/2026
2.10.7 3 04/30/2026
2.10.6 2 04/30/2026
2.10.5 2 04/30/2026
2.10.3 3 04/30/2026
2.10.2 3 04/30/2026
2.9.4 2 04/30/2026
2.9.3-beta.2 3 04/30/2026
2.8.14-beta.22 4 04/30/2026
2.8.13-beta.21 4 04/30/2026
2.8.12-beta.20 3 04/30/2026
2.8.11-beta.19 3 04/30/2026
2.8.10-beta.18 3 04/30/2026
2.8.9-beta.17 3 04/30/2026
2.8.8-beta.14 3 04/30/2026
2.8.7-beta.9 2 04/30/2026
2.8.5-beta.4 3 04/30/2026
2.8.5-beta.2 3 04/30/2026
2.8.4-beta.3 2 04/30/2026
2.8.3 4 04/30/2026
2.8.2 3 04/30/2026
2.7.80-beta.159 2 04/30/2026
2.7.71-beta.150 3 04/30/2026
2.7.69-beta.147 3 04/30/2026
2.7.68-beta.146 4 04/30/2026
2.7.66-beta.142 3 04/30/2026
2.7.65-beta.141 2 04/30/2026
2.7.64-beta.140 2 04/30/2026
2.7.62-beta.138 3 04/30/2026
2.7.60-beta.127 4 04/30/2026
2.7.59-beta0123 3 04/30/2026
2.7.58-beta0122 2 04/30/2026
2.7.54-beta0117 3 04/30/2026
2.7.53-beta0116 3 04/30/2026
2.7.52-beta0105 2 04/30/2026
2.7.51-beta0102 3 04/30/2026
2.7.50-beta0094 4 04/30/2026
2.7.49-beta0091 3 04/30/2026
2.7.48-beta0087 2 04/30/2026
2.7.47-beta0081 3 04/30/2026
2.7.46-beta0080 3 04/30/2026
2.7.45-beta0079 2 04/30/2026
2.7.44-beta0078 3 04/30/2026
2.7.42-beta0076 3 04/30/2026
2.7.41-beta0075 3 04/30/2026
2.7.38-beta0072 3 04/30/2026
2.7.37-beta0071 3 04/30/2026
2.7.36-beta0070 3 04/30/2026
2.7.35-beta0069 3 04/30/2026
2.7.34-beta0068 4 04/30/2026
2.7.33-beta0067 2 04/30/2026
2.7.32-beta0066 3 04/30/2026
2.7.31-beta0064 3 04/30/2026
2.7.30-beta0050 2 04/30/2026
2.7.29-beta0046 3 04/30/2026
2.7.28-beta0045 2 04/30/2026
2.7.27-beta0043 3 04/30/2026
2.7.21-beta0036 3 04/30/2026
2.7.20-beta0032 2 04/30/2026
2.7.19-beta0030 4 04/30/2026
2.7.4-beta0001 2 04/30/2026
2.7.3 2 04/30/2026
2.7.2 3 04/30/2026
2.7.1 4 04/30/2026
2.7.0 2 04/30/2026
2.6.9 4 04/30/2026
2.6.8 2 04/30/2026
2.6.7 2 04/30/2026
2.6.6 2 04/30/2026
2.6.5 5 04/30/2026
2.6.4 3 04/30/2026
2.6.3 4 04/30/2026
2.6.2 3 04/30/2026
2.6.1 3 04/30/2026
2.6.0 5 04/30/2026
2.5.1 4 04/30/2026
2.5.0 3 04/30/2026
2.4.1 3 04/30/2026
2.4.0 4 04/30/2026
2.3.2 2 04/30/2026
2.3.1 3 04/30/2026
2.3.0 4 04/30/2026
2.2.19 3 04/30/2026
2.2.18 2 04/30/2026
2.2.17 4 04/30/2026
2.2.16 3 04/30/2026
2.2.15 3 04/30/2026
2.2.14 3 04/30/2026
2.2.13 2 04/30/2026
2.2.12 3 04/30/2026
2.2.11 3 04/30/2026
2.2.10 4 04/30/2026
2.2.9 2 04/30/2026
2.2.8 3 04/30/2026
2.2.7 4 04/30/2026
2.2.6 3 04/30/2026
2.2.5 3 04/30/2026
2.2.4 4 04/30/2026
2.2.3 3 04/30/2026
2.2.2 2 04/30/2026
2.2.1 3 04/30/2026
2.2.0 2 04/30/2026
2.1.1 4 04/30/2026
2.0.0 3 04/30/2026
1.1.4 4 04/30/2026
1.1.3 3 04/30/2026
1.1.2 3 04/30/2026
1.1.1 3 04/30/2026
1.1.0 2 04/30/2026
1.0.3 4 04/30/2026
1.0.2 2 04/30/2026
1.0.1 3 04/30/2026
1.0.0 4 04/30/2026