There is an error in the documentation regarding environment variable use within the Docker image for consul.
The documentation states: Setting
docker run is equivalent to passing in the
-client flag(documented here) or
-bind flag(documented here) to Consul on startup.
Further, the documentation for
-bind states that as of 1.0, Go templates are supported for the selection of the interface. Configuration | Consul by HashiCorp
ip to parse the value of the variables and
ip does not support the Go template. But, if you pass
-bind in the arguments, the Go template is consumed without an issue.