#docker #container #api #unix

yanked moby

Actively maintained Rust interface for maneuvering Docker containers

0.1.2 Apr 9, 2021
0.1.1 Apr 9, 2021
0.1.0 Apr 9, 2021

#32 in #containers

MIT license

165KB
4.5K SLoC

moby

GitHub Actions MIT licensed Released API docs

a rust interface for maneuvering docker containers

install

Add the following to your Cargo.toml file

[dependencies]
moby = "0.1"

usage

Many small runnable example programs can be found in this repository's examples directory.


lib.rs:

moby is a multi-transport utility for maneuvering docker containers

examples

let docker = moby::Docker::new("tcp://127.0.0.1:80").unwrap();

match docker.images().list(&Default::default()).await {
    Ok(images) => {
        for image in images {
            println!("{:?}", image.repo_tags);
        }
    },
    Err(e) => eprintln!("Something bad happened! {}", e),
}

Dependencies

~11–23MB
~372K SLoC