mirror of
https://github.com/moby/buildkit.git
synced 2026-11-06 05:16:45 +00:00
Copies a slim version of the docker client with only the necessary methods so we can break our dependency on the client in moby. This client is only used in an integration test so it's not really needed and we don't really actively need updates or to be on the most recent API version since we just do an unversioned ping and then call the hijack method. This was created by copying the package into `testutil` and then deleting unused sections of code. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
14 lines
444 B
Go
14 lines
444 B
Go
package client
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
// ErrorConnectionFailed returns an error with host in the error message when connection to docker daemon failed.
|
|
func ErrorConnectionFailed(host string) error {
|
|
if host == "" {
|
|
return errors.New("Cannot connect to the Docker daemon. Is the docker daemon running on this host?")
|
|
}
|
|
return errors.Errorf("Cannot connect to the Docker daemon at %s. Is the docker daemon running?", host)
|
|
}
|