From 9a0417144ae064e39a1efae3b76fb84374353120 Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Mon, 19 Jun 2017 20:09:02 +0300 Subject: [PATCH] Passing cm environment variables to started Selenoid container (fixes #35) --- selenoid/docker.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/selenoid/docker.go b/selenoid/docker.go index 7786a82..ca8ba7c 100644 --- a/selenoid/docker.go +++ b/selenoid/docker.go @@ -22,6 +22,8 @@ import ( "strconv" "strings" "time" + "os" + . "vbom.ml/util/sortorder" ) @@ -395,9 +397,8 @@ func (c *DockerConfigurator) Start() error { if image == nil { return errors.New("Selenoid image is not downloaded: this is probably a bug") } - env := []string{ - fmt.Sprintf("TZ=%s", time.Local), - } + env := os.Environ() + env = append(env, fmt.Sprintf("TZ=%s", time.Local)) portString := strconv.Itoa(selenoidContainerPort) port, err := nat.NewPort("tcp", portString) if err != nil {