let docker = Docker::connect_with_http(&hostname, 4, API_DEFAULT_VERSION)
.expect("failed to initialize docker connection");
let something = rt.block_on(docker.ping()).expect("failed to ping dockerd");
println!("ping result: {}", something);
hostname is set to 192.168.122.253:2375, which I've validated works using docker -H=192.168.122.253:2375 version. The rust code, however, returns this error message:
thread '<unnamed>' panicked at 'failed to ping dockerd: JsonSerdeError { err: Error("expected value", line: 1, column: 1) }', src/lib.rs:41:48
How can I debug what the issue is here? Worth pointing out I've tested this code with Docker::connect_with_local_defaults() and it works.
hostname
is set to192.168.122.253:2375
, which I've validated works usingdocker -H=192.168.122.253:2375 version
. The rust code, however, returns this error message:How can I debug what the issue is here? Worth pointing out I've tested this code with
Docker::connect_with_local_defaults()
and it works.