File: load.rs

package info (click to toggle)
rust-dockworker 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 764 kB
  • sloc: makefile: 2
file content (12 lines) | stat: -rw-r--r-- 337 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
use dockworker::Docker;
use std::path::Path;

#[tokio::main]
async fn main() {
    let docker = Docker::connect_with_defaults().unwrap();
    let id = docker
        .load_image(false, Path::new("image.tar"))
        .await
        .expect("prepare a tar-archive like: $docker save busybox > image.tar");
    println!("loaded: {id}");
}