fix(docker/container): pass empty command and entrypoint [EE-6106] (#10285)

pull/8726/head^2
Chaim Lev-Ari 2023-09-13 10:47:13 +01:00 committed by GitHub
parent 0a80f4dc51
commit fbdbd277f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -20,14 +20,18 @@ export function toRequest(
User: values.user,
WorkingDir: values.workingDir,
...getConsoleConfig(values.console),
};
} satisfies CreateContainerRequest;
if (values.cmd) {
config.Cmd = commandStringToArray(values.cmd);
} else if (values.cmd === null) {
delete config.Cmd;
}
if (values.entrypoint) {
config.Entrypoint = commandStringToArray(values.entrypoint);
} else if (values.entrypoint === null) {
delete config.Entrypoint;
}
return config;