Skip to content

Commit

Permalink
podex - DOCKER_HOST envar check
Browse files Browse the repository at this point in the history
  • Loading branch information
jhadvig committed Oct 7, 2014
1 parent e294cef commit e7af7b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/podex/podex.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ func main() {
baseName := parts[len(parts)-1]

dockerHost := os.Getenv("DOCKER_HOST")
if dockerHost == "" {
log.Fatalf("DOCKER_HOST is not set")
}

docker, err := dockerclient.NewClient(dockerHost)
if err != nil {
log.Fatalf("failed to connect to %q: %v", dockerHost, err)
Expand Down

0 comments on commit e7af7b5

Please sign in to comment.