{"repo":"bossm8/dockerfile-templater","free":true,"listed":false,"github":"https://github.com/bossm8/dockerfile-templater","clone":"git clone https://github.com/bossm8/dockerfile-templater.git","description":"GO utility to generate Dockerfiles in different variants from yml data","language":"Go","stars":20,"topics":["docker","docker-template","dockerfile","dockerfile-generator","dockerfile-templating","go-template","template"],"license":"BSD-3-Clause","category":"deployment-docker-iac","readme_excerpt":"Dockerfile Templater Simple GO utility to generate Dockerfiles from a template accepting yml data. Introduction This utility helps deduplicating code by generating multiple Dockerfiles from a single template. Making multi-variant image builds easier and faster. The templater is able to generate Dockerfiles in different variants from a go templated Dockerfile (the templater includes sprig to provide more template functionality). The data passed to the template is read from a yml configuration file (variants). To make things more dynamic, the variants file can itself be a template and accept data from an additional yml file (variants configuration). Read below to get more information about each file and their required format. Usage Template Functions The templater includes sprig (which is also included in helm) to extend the limited set of go template functions. Additionally it also brings the following custom functions: - toYaml Paste yaml structures into templates: Variants YML Flag: --variants.def The main template configuration which will ultimately be passed to the Dockerfile template. It must contain the following structure: Plain If you do not provide an additional variants configuration file ( --variants.cfg ) the variants file ( --variants.def ) is expected to be a valid yml file. There will be no processing and the data read from the file is directly passed to the Dockerfile template. Templated As mentioned, the variants can itself be templated, this enables a high fl","default_branch":null,"files":null,"tree":[],"storefront":"/r/bossm8","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bossm8/dockerfile-templater/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}