Crate harbourmaster[][src]

Expand description

Continuous integration Latest Docs

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 harbourmaster::Container;

#[tokio::main]
async fn main() {
    let image = "alpine";

    println!("creating container!");
    let container = Container::new(image).await.unwrap();
    println!("container created!");

    println!("removing container!");
    container.delete().await.unwrap();
    println!("container removed!");
}

Structs

Docker client

Abstraction of a running Docker container.

Builder struct for fine control over the construction of a Container.

Abstraction of a Docker network

Enums

Enum representing a port’s communication protocol