Minor enhancement & bugfix
Release notes
Features
Added Feature DeleteIfExist
DeleteIfExists(bool removeVolumes = true, bool force = false, string removeLink = null)
It ensures that a container is deleted before creating. Hence the inverse ReuseIfExists()
.
var name = Guid.NewGuid().ToString();
var container = Fd.UseContainer()
.UseImage("postgres:9.6-alpine")
.WithName($"name-{name}")
.Build();
var id = container.Id;
using (var c = Fd
.UseContainer()
.DeleteIfExists()
.UseImage("postgres:9.6-alpine")
.WithName($"name-{name}")
.Build())
{
// Ids should not be equal - since deleted and then created.
AreNotEqual(id, c.Id);
}
Added Created on Container configuration
This exposes the DateTime
when the container was created.
Added Compose Project Directory
It is now possible to do UseProjectDirectory()
in the CompositeBuilder
to specify a project directory. This was implemented in PR #217 and brought up in Issue #216.
Examples
Added a Example
solution to start showing some simple solutions instead of, possibly, complex unit test to understand how to use this library.
Notable PRs
PR #171 from Diggzinc/master
Simplified Trace and support for routing to any logging framework. For example, like this.
PR #200 from 0xced
Fixed bug: On macOS, tests running the envtest.sh
script would fail with a permission denied exception because the script is not exectuable
PR #201/#204 from 0xced
Allow to PublishAllPorts
instead of explicit portmappings as a shorthand. Added ExposeAllPorts
.
PR #202 from 0xced
Hide real exeption when throwOnError
in a container export is fixed.
PR #203 from 0xced
Fixes many typos
PR #218 from jgozner
Added a Ductus.FluentDocker.XUnit NuGet package to be used when doing XUnit testing instead of mstest.