Use DOCKER_HOST env to search for docker before searching for a hardcode docker socket (#763)

Fix #757
This commit is contained in:
mscherer 2022-02-09 00:08:20 +01:00 committed by GitHub
parent 7521336627
commit 3b52afab93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,6 +36,9 @@ func (e *docker) Name() string {
}
func (e *docker) IsAvailable() bool {
if os.Getenv("DOCKER_HOST") != "" {
return true
}
_, err := os.Stat("/var/run/docker.sock")
return err == nil
}