import { readFileSync } from 'fs' ; import { resolve } from 'path' ; import Mustache from 'mustache' ; import { TemplateContext } from '../template_context' ; function generator ( options ) { const dir = options . ironbank ? 'ironbank' : 'base' ; const template = readFileSync ( resolve ( __dirname , dir , './Dockerfile' ) ) ; return Mustache . render ( template . toString ( ) , { packageManager : options . ubi ? 'microdnf' : 'apt-get' , ... options , } ) ; } export const dockerfileTemplate = { name : 'Dockerfile' , generator , } ;