Skip to content

Commit c80a97f

Browse files
committed
Fix broken overrideCommand config
1 parent e0598db commit c80a97f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/spec-node/singleContainer.ts

+3-9
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ async function buildAndExtendImage(buildParams: DockerResolverParameters, config
196196
if (buildParams.buildxPush) {
197197
args.push('--push');
198198
} else {
199-
if (buildParams.buildxOutput) {
199+
if (buildParams.buildxOutput) {
200200
args.push('--output', buildParams.buildxOutput);
201201
} else {
202202
args.push('--load'); // (short for --output=docker, i.e. load into normal 'docker images' collection)
@@ -385,18 +385,12 @@ export async function spawnDevContainer(params: DockerResolverParameters, config
385385
);
386386

387387
const customEntrypoints = mergedConfig.entrypoints || [];
388-
const entrypoint = ['--entrypoint', '/bin/sh'];
389-
const cmd = ['-c', `echo Container started
388+
const entrypoint = typeof typeof mergedConfig.overrideCommand === 'boolean' && !mergedConfig.overrideCommand ? [] : ['--entrypoint', '/bin/sh'];
389+
const cmd = typeof mergedConfig.overrideCommand === 'boolean' && !mergedConfig.overrideCommand ? [] : ['-c', `echo Container started
390390
trap "exit 0" 15
391391
${customEntrypoints.join('\n')}
392392
exec "$@"
393393
while sleep 1 & wait $!; do :; done`, '-']; // `wait $!` allows for the `trap` to run (synchronous `sleep` would not).
394-
const overrideCommand = mergedConfig.overrideCommand;
395-
if (overrideCommand === false && imageDetails) {
396-
const details = await imageDetails();
397-
cmd.push(...details.Config.Entrypoint || []);
398-
cmd.push(...details.Config.Cmd || []);
399-
}
400394

401395
const args = [
402396
'run',

0 commit comments

Comments
 (0)