Closed patrickap closed 4 months ago
As a workaround, I've been calling docker.ping()
immediately after creating the connection
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
Can confirm, this is not a regression, happy if you can add this as a feature
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.