diff --git a/.goxc.json b/.goxc.json index 7f3a1c8..daa3ad9 100644 --- a/.goxc.json +++ b/.goxc.json @@ -4,7 +4,7 @@ "xc" ], "BuildConstraints": "linux, windows, darwin", - "PackageVersion": "1.6.0", + "PackageVersion": "1.7.0", "TaskSettings": { "xc": { "GOARM": "7" diff --git a/main.go b/main.go index c1cadf5..b8f2727 100644 --- a/main.go +++ b/main.go @@ -48,6 +48,8 @@ if [[ $interactivebash == "true" ]]; then {{range $key, $value := .Service.Environment}}-e {{$key}}="{{$value}}" {{end}} \ {{range .Service.Ports}}-p {{.}} {{end}} \ {{range .Service.Env_File}}--env-file {{.}} {{end}} \ + {{if .Service.Log_Driver}}--log-driver {{.Service.Log_Driver}} {{end}} \ + {{range $key, $value := .Service.Log_Opt}}--log-opt {{$key}}={{$value}} {{end}} \ {{.Service.Image}} bash else /usr/bin/docker {{.DockerHostConnCmdArg}} run \ @@ -62,6 +64,8 @@ else {{range $key, $value := .Service.Environment}}-e {{$key}}="{{$value}}" {{end}} \ {{range .Service.Ports}}-p {{.}} {{end}} \ {{range .Service.Env_File}}--env-file {{.}} {{end}} \ + {{if .Service.Log_Driver}}--log-driver {{.Service.Log_Driver}} {{end}} \ + {{range $key, $value := .Service.Log_Opt}}--log-opt {{$key}}={{$value}} {{end}} \ {{.Service.Image}} {{.Service.Command}} fi {{else}} @@ -77,6 +81,8 @@ fi {{range $key, $value := .Service.Environment}}-e {{$key}}="{{$value}}" {{end}} \ {{range .Service.Ports}}-p {{.}} {{end}} \ {{range .Service.Env_File}}--env-file {{.}} {{end}} \ + {{if .Service.Log_Driver}}--log-driver {{.Service.Log_Driver}} {{end}} \ + {{range $key, $value := .Service.Log_Opt}}--log-opt {{$key}}={{$value}} {{end}} \ {{.Service.Image}} {{.Service.Command}} {{end}} ` @@ -102,6 +108,8 @@ type Service struct { Privileged bool Command string Environment map[string]string + Log_Driver string + Log_Opt map[string]string } // Parses the original Yaml to the Service struct