You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the connect_with_ methods return a type of Result<Docker, Error> without performing any availability check. This means that even if the Docker Socket is not available, the method returns Ok() instead of Err().
For example, when attempting to connect using Docker::connect_with_socket_defaults(), if /var/run/docker.sock is not available, it still returns Ok() instead of Err().
To improve usability and prevent unexpected behavior, I propose adding an availability check during connection creation. This check should verify the availability of the Docker Socket and return an error if it's not accessible.
let docker = matchDocker::connect_with_socket_defaults(){Ok(docker) => docker,Err(err) => {eprintln!("failed to connect to docker daemon: {:?}", err);return;}};
The text was updated successfully, but these errors were encountered:
Hmm.. thanks for reporting, let's check first that this isn't a regression from the previous version, because quite a lot changed with the hyper 1.x upgrade
Currently, the
connect_with_
methods return a type ofResult<Docker, Error>
without performing any availability check. This means that even if the Docker Socket is not available, the method returnsOk()
instead ofErr()
.For example, when attempting to connect using
Docker::connect_with_socket_defaults()
, if/var/run/docker.sock
is not available, it still returnsOk()
instead ofErr()
.To improve usability and prevent unexpected behavior, I propose adding an availability check during connection creation. This check should verify the availability of the Docker Socket and return an error if it's not accessible.
The text was updated successfully, but these errors were encountered: