It can also inspect to gain deeper information about the network (such as which containers is in the network and Ipam configuration) by _docker.NetworkInspect(network:'networkId'). It can discover networks by _docker.NetworkLs() where it discovers all networks and some simple parameters defined in NetworkRow. Docker NetworkingįluentDocker do support all docker network commands. The Fluent API makes use of those in some situations such as Copy files, export, etc. The hooks are particulary good if you want something to be executed when a state is about to be set (or executed) on the service such as Starting. If multiple hooks are registered on same service instance, with same ServiceRunningState, they will be executed in installation order. It is possible to install and remove hooks on the fly. In the ExportOnDispose(path, lambda) installs a Hook when the service state is set to execute the lambda when the state is Removing. IService HooksĪll services can be extended with hooks.
This snippet will export the container when the using statement is disposing the container since the failure variable is set to true and is used in the ExportOnDispose expression. GetCurrentDirectory (), ( TemplateString ) 'Resources/ComposeTests/WordPress/docker-compose.yml' ) // using ( var svc = new Builder ().