user@computer: ~$ cat src/main.rs
extern crate boondock;
use boondock::Docker;
fn main() {
let docker = Docker::connect_with_defaults().unwrap();
}
user@computer: ~$ # No docker on my computer, the program should panic because of the .unwrap().
user@computer: ~$ which docker
user@computer: ~$ # Nor the default socket
user@computer: ~$ ls /var/run/docker.sock
ls: cannot access '/var/run/docker.sock': No such file or directory
user@computer: ~$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.20s
Running `target/debug/opendd`
user@computer: ~$ # Unfortunately, no crash .-.
user@computer: ~$
Maybe I don't understand, but it's pretty straight forward to me that this should crash because connect_with_defaults() returns a Result<Docker>.
So I've been using the lib like so :
Maybe I don't understand, but it's pretty straight forward to me that this should crash because
connect_with_defaults()
returns aResult<Docker>
.