test with docker-api (no oficial) lib

This commit is contained in:
2023-06-12 19:43:14 +02:00
commit 2b0d2b07d1
11 changed files with 2108 additions and 0 deletions

19
src/main.rs Normal file
View File

@@ -0,0 +1,19 @@
use futures::executor::block_on;
use std::io;
use tokio::net::TcpListener;
use tokio::io::AsyncWriteExt;
mod create_container;
mod server;
mod conf;
#[tokio::main]
async fn main() {
let docker = match docker_api::Docker::new("unix:///var/run/docker.sock") {
Ok(d) => d,
Err(e) => {print!("{}",e.to_string()); panic!("{}", e.to_string())},
};
block_on(create_container::list(docker.clone()));
//block_on(create_container::create(docker.clone()));
//block_on(create_container::list_c(docker));
//server::start().await;
}