Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (26 sloc) 884 Bytes
// cargo run --example imagepull_auth busybox username password
use shiplift::{Docker, PullOptions, RegistryAuth};
use std::env;
use tokio::prelude::{Future, Stream};
fn main() {
let docker = Docker::new();
let img = env::args()
.expect("You need to specify an image name");
let username = env::args().nth(2).expect("You need to specify an username");
let password = env::args().nth(3).expect("You need to specify a password");
let auth = RegistryAuth::builder()
let fut = docker
.for_each(|output| {
println!("{:?}", output);
.map_err(|e| eprintln!("Error: {}", e));
You can’t perform that action at this time.