dockerize icon indicating copy to clipboard operation
dockerize copied to clipboard

Expanding list of helper functions

Open dbeckham opened this issue 9 years ago • 2 comments

@jwilder Dockerize is fantastic. I've started using it, and it's helping to fill big configuration holes that Docker has.

What do you think about expanding the list of helper functions available? Your docker-gen project has a lot of good functions that you make available to templates, but it's a little sparse in Dockerize. One that simple addition would be the strings.Join method. A common pattern I find myself using is a comma separated list of host:port entries -e 1.1.1.1:80,2.2.2.2:81 that needs to be translated to "1.1.1.1:80","2.2.2.2:81" in the template file.

Will you accept pull requests for new functions, or is there an underlying anti-pattern you are trying to avoid? (bloat, dependency requirements, redundancy, etc.)

dbeckham avatar Jun 21 '16 15:06 dbeckham

PRs are welcome.

jwilder avatar Jun 23 '16 05:06 jwilder

Sprig is a library of Go template functions, it could be used here. https://github.com/Masterminds/sprig

ludovicc avatar Aug 30 '16 12:08 ludovicc