Fix docker-compose build args
This commit is contained in:
parent
bfd3020031
commit
db5cd21884
@ -52,13 +52,14 @@ export default async function (data) {
|
|||||||
}
|
}
|
||||||
value['environment'] = [...environment, ...envs];
|
value['environment'] = [...environment, ...envs];
|
||||||
|
|
||||||
let build = typeof value['build'] === 'undefined' ? [] : value['build'];
|
let build = typeof value['build'] === 'undefined' ? {} : value['build'];
|
||||||
if (Object.keys(build).length > 0) {
|
let buildArgs = typeof build['args'] === 'undefined' ? [] : value['args'];
|
||||||
build = Object.entries(build).map(([key, value]) => `${key}=${value}`);
|
if (Object.keys(buildArgs).length > 0) {
|
||||||
|
buildArgs = Object.entries(buildArgs).map(([key, value]) => `${key}=${value}`);
|
||||||
}
|
}
|
||||||
value['build'] = {
|
value['build'] = {
|
||||||
...build,
|
...build,
|
||||||
args: [...(build?.args || []), ...buildEnvs]
|
args: [...buildArgs, ...buildEnvs]
|
||||||
};
|
};
|
||||||
|
|
||||||
value['labels'] = labels;
|
value['labels'] = labels;
|
||||||
|
Loading…
Reference in New Issue
Block a user