start build args implementation
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
Reference in New Issue
Block a user