Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.07 KB

README.md

File metadata and controls

50 lines (36 loc) · 1.07 KB

KISS Docker Wrapper in Rust

Rust

An Extremely Simple Async Docker Wrapper in Rust

Contrary to other libraries, KISS Docker does not depend on the docker socket, but uses use async_process::Command to build and execute the right commands.

Quick start

[dependencies]
kiss_docker = "0.0.2"
extern crate kiss_docker;

use kiss_docker::container::Container;

#[tokio::main]
async fn main() {
    match kiss_docker::container::list_all(Some("alpine")).await {
        Ok(containers) => containers
            .iter()
            .for_each(|container| println!("{}", container.id)),
        Err(e) => {
            panic!("{}", e);
        }
    };
}

See the the examples directory for more examples.

Testing

Running the tests by default requires a few docker images locally

docker pull alpine

Afterwards it's the usual:

cargo test