Skip to content

Commit 4f0e123

Browse files
committed
fix: docker build args parsing, rm --squash
1 parent ceca53e commit 4f0e123

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

bin/cmds/docker_cmds/build.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@ export const handler = async (argv) => {
3232
process.exit(1);
3333
}
3434

35-
const args = [
36-
'docker build',
37-
'--squash',
38-
`-t ${mainTag}`,
39-
`-f ${tmpDockerfile}`,
40-
];
35+
const args = ['-t', mainTag, '-f', tmpDockerfile];
4136

4237
const {
4338
docker_build_args: dba,
@@ -47,7 +42,7 @@ export const handler = async (argv) => {
4742

4843
if (dba && typeof dba === 'object') {
4944
for (const [prop, value] of Object.entries(dba)) {
50-
args.push(`--build-arg ${prop}=${value}`);
45+
args.push('--build-arg', `${prop}=${value}`);
5146
}
5247
}
5348

@@ -59,7 +54,7 @@ export const handler = async (argv) => {
5954
}
6055

6156
// start builder
62-
const build = await $({ stdio: 'inherit' })`${args} ${context}`;
57+
const build = await $({ stdio: 'inherit' })`docker build ${args} ${context}`;
6358

6459
// cleanup right away
6560
await fs.unlink(tmpDockerfile);

0 commit comments

Comments
 (0)