Skip to content

Commit bf15bf4

Browse files
committed
fixes problem missing the environment variable’s name
1 parent 9a3aaa1 commit bf15bf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package main
33
import (
44
"flag"
55
"fmt"
6-
"gopkg.in/yaml.v2"
76
"io/ioutil"
87
"log"
98
"os"
109
"path"
1110
"text/template"
11+
12+
"gopkg.in/yaml.v2"
1213
)
1314

1415
var (
@@ -31,7 +32,7 @@ fi
3132
-d \
3233
--name {{.Name}}_1 \
3334
{{range .Volumes}}-v {{.}} {{end}} \
34-
{{range .Environment}}-e {{.}} {{end}} \
35+
{{range $key, $value := .Environment}}-e {{$key}}="{{$value}}" {{end}} \
3536
{{range .Ports}}-p {{.}} {{end}} \
3637
{{.Image}} {{.Command}}
3738
`

0 commit comments

Comments
 (0)