fn exec_docker_command<A, S>(name: &str, args: A) -> String
where
    A: IntoIterator<Item = S>,
    S: AsRef<OsStr>,
{
    let output = process::Command::new("docker")
        .arg(name)
        .args(args)
        .stdout(process::Stdio::piped())
        .output()
        .unwrap_or_else(|err| panic!("error invoking `docker {}`: {}", name, err));

    if !output.status.success() {
        panic!("`docker {}` exited with error status: {:?}", name, output);
    }

    str::from_utf8(&output.stdout)
        .expect("UTF-8 error decoding docker output")
        .trim_end()
        .to_owned()
}
/// Execute a given `docker` command, returning what was written to stdout
/// if the command completed successfully.
///
/// Panics if the `docker` process exits with an error code.
Execute a given `docker` command, returning what was written to stdout
if the command completed successfully.

Panics if the `docker` process exits with an error code.
Execute a given ` docker ` command returning what was written to stdout if the command completed successfully . Panics if the ` docker ` process exits with an error code .
fn exec_docker_command<A, S>(name: &str, args: A) -> String
where
    A: IntoIterator<Item = S>,
    S: AsRef<OsStr>,
{
    let output = process::Command::new("docker")
        .arg(name)
        .args(args)
        .stdout(process::Stdio::piped())
        .output()
        .unwrap_or_else(|err| panic!("error invoking `docker {}`: {}", name, err));
    if !output.status.success() {
        panic!("`docker {}` exited with error status: {:?}", name, output);
    }
    str::from_utf8(&output.stdout)
        .expect("UTF-8 error decoding docker output")
        .trim_end()
        .to_owned()
}
fn exec_docker_command < A , S > ( name : & str , args : A ) -> String where A : IntoIterator < Item = S > , S : AsRef < OsStr > , { let output = process :: Command :: new ( " " ) . arg ( name ) . args ( args ) . stdout ( process :: Stdio :: piped ( ) ) . output ( ) . unwrap_or_else ( | err | panic ! ( " " name err ) ) ; if ! output . status . success ( ) { panic ! ( " " name output ) ; } str :: from_utf8 ( & output . stdout ) . expect ( " " ) . trim_end ( ) . to_owned ( ) }
Execute a given `docker` command, returning what was written to stdout
if the command completed successfully.
Execute a given ` docker ` command returning what was written to stdout if the command completed successfully .
name
&str
args
A
name
&str
args
A