mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 11:51:02 +00:00
Use DOCKER_HOST
env to search for docker before searching for a hardcode docker socket (#763)
Fix #757
This commit is contained in:
parent
7521336627
commit
3b52afab93
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue