Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Pass all environment variables to the Docker CLI
Browse files Browse the repository at this point in the history
Fixes: #35
  • Loading branch information
flx42 committed Jan 15, 2016
1 parent e124d91 commit d02f06d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tools/src/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os"
"os/exec"
"regexp"
"strings"
"syscall"
)

Expand Down Expand Up @@ -124,18 +123,11 @@ func ImagePull(image string) error {
}

func Docker(arg ...string) error {
var env []string

cmd, err := exec.LookPath(dockerCmd[0])
if err != nil {
return err
}
args := append(dockerCmd, arg...)

for _, e := range os.Environ() {
if strings.HasPrefix(e, "DOCKER_") {
env = append(env, e)
}
}
return syscall.Exec(cmd, args, env)
return syscall.Exec(cmd, args, os.Environ())
}

0 comments on commit d02f06d

Please sign in to comment.