Skip to content

Commit

Permalink
Do not hardcode docker socket
Browse files Browse the repository at this point in the history
Fix #757
  • Loading branch information
mscherer committed Feb 8, 2022
1 parent 8ce4178 commit 71aa99b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pipeline/backend/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 71aa99b

Please sign in to comment.