docker-gen icon indicating copy to clipboard operation
docker-gen copied to clipboard

add '=' operand support

Open zam5607822 opened this issue 7 years ago • 3 comments

when i write these in template file: $is_https = "true"

docker-gen complained:

Unable to parse template: template: nginx.tmpl:188: unexpected "=" in operand

it seems that template engine does not support '=' operand,but text/template in go package does support,see Package template which says:

Variables previously declared can also be assigned, using the syntax: $variable = pipeline

so what's the problem? is the version of template which docker-gen used too old?

zam5607822 avatar Dec 26 '18 01:12 zam5607822

I had the same issue. Discovered that feature was added in go 1.11. The docker-gen releases are all built with go 1.9.

I created a fork and got it working with go 1.11 https://github.com/coderedcorp/docker-gen

Also available on docker hub https://hub.docker.com/r/coderedcorp/docker-gen

vsalvino avatar Jan 04 '19 05:01 vsalvino

👍 I've faced same issue while trying to elegantly fix https://github.com/jwilder/nginx-proxy/issues/1132 😞

blazej-pachut-gforces avatar Jan 30 '19 12:01 blazej-pachut-gforces

+1

tjhiggins avatar Jul 22 '20 17:07 tjhiggins

Non longer relevant, docker-gen is built with up-to-date version of Go.

buchdag avatar Feb 25 '24 18:02 buchdag