-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't evaluate fields in template strings #273
Comments
Confirmed that this worked in docker 1.12. I fear this is a bit of chicken and egg where the labels aren't available in time. Not sure what we can reasonably do in logspout. Might be worth opening an issue against docker/docker? docker 1.13 service inspect without env set:
|
I'm having a similar issue trying to set {{.Service.Name}}-{{.Task.Slot}} as syslog tag on my stack/compose file.
suggestions? |
Seems this have been solved on docker 17.10 |
did you test it? i'm still having issues.
|
docker 17.10 cannot be used in production because contains some critical errors (that fixed in the 17.11, but again, it is edge release and another critical error maybe). As a solution, I just forked this project and build own image. develar@c9d3571 |
Same problem stack:
error:
|
is there an update for this ? can we use template variables in any environment variables ? |
context.go looks to be the file that drives what can be templated. Could this be extended to support additional configuration (e.g. Node.Labels)? |
I hit same problem with the expression RAW_FORMAT: {{ index .Config.Labels "com.docker.swarm.service.name" }} After many attempts found that you have to wrap Go Template expressions in another pair of curly braces. |
Gentlemen, I started to have issues with format templates after I upgraded docker engine from 1.12 to 1.13.
Steps to reproducte
Actual result
But if I run
docker inspect --format {{.Config.Labels}} dda42680d044
it all works.Any ideas?
The text was updated successfully, but these errors were encountered: