tpl is small utility that transforms templates to text - a bare-bone confd alternative, that follows the unix philosophy of “Do One Thing and Do It Well”.
In other words, it just transforms template files to text, and spits the output to stdout.
It’s small, fast and is only one binary! grab it from here.
Why?
I needed a small binary that can consume dynamic data from different sources.
confd is awesome, but it does much more than just transform templates.
plus, many times specific filters are missing and I needed a way to add new filters easily
How?
The trivial, piping case would be:
# pipe your template |
but having a full blown templating engine at your fingertips is quite useful.
what if you want to create several Dockerfile(s) for different Elasticsearch versions, and even specific plugins?
FROM elasticsearch:{{"VERSION" | getenv:"latest" }} |
now run it:
# without any arguments |