[−][src]Crate harbourmaster
Harbourmaster is a library of high-level abstractions of Docker objects.
Harbourmaster is built on top of the excellent 'shiplift', but provides an object-oriented interface that is a little easier to work with for some use cases.
Particularly useful for unit testing that involves spinning up and then removing Docker containers.
Usage
use tokio::prelude::Future; use harbourmaster::Container; let image = "alpine"; let fut = Container::new(image) .map( |container| { println!("container created!"); container }) .and_then( |container| { println!("removing container"); container.delete() }) .map_err( |e| println!("Error: {}", e) ); tokio::run(fut);
Structs
Client | Docker client |
Container | Abstraction of a running Docker container. |
ContainerBuilder | Builder struct for fine control over the construction of a Container. |
Network |
Enums
Protocol | Enum representing a port's communication protocol |