start build args implementation

This commit is contained in:
2017-08-28 19:11:24 +02:00
parent 214c523306
commit 37b3c1abc9
8 changed files with 31 additions and 7 deletions

View File

@ -40,7 +40,8 @@ export class Dockerfile {
*/
async build () {
plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag)
let buildCommand = `docker build -t ${this.buildTag} -f ${this.filePath} .`
let buildArgsString = await helpers.getDockerBuildArgs()
let buildCommand = `docker build -t ${this.buildTag} -f ${this.filePath} ${buildArgsString} .`
await bash(buildCommand)
return
}

View File

@ -153,6 +153,15 @@ export let getDockerTagString = (registryArg: string, repoArg: string, versionAr
return tagString
}
export let getDockerBuildArgs = async (): Promise<string> => {
plugins.beautylog.info('checking for env vars to be supplied to the docker build')
let buildArgsString: string = ''
for (let key in NpmciConfig.configObject.dockerEnvBuildargMap) {
// TODO
}
return buildArgsString
}
/**
*
*/