mirror of https://github.com/portainer/portainer
fix(docker/container): pass empty command and entrypoint [EE-6106] (#10285)
parent
0a80f4dc51
commit
fbdbd277f7
|
@ -20,14 +20,18 @@ export function toRequest(
|
||||||
User: values.user,
|
User: values.user,
|
||||||
WorkingDir: values.workingDir,
|
WorkingDir: values.workingDir,
|
||||||
...getConsoleConfig(values.console),
|
...getConsoleConfig(values.console),
|
||||||
};
|
} satisfies CreateContainerRequest;
|
||||||
|
|
||||||
if (values.cmd) {
|
if (values.cmd) {
|
||||||
config.Cmd = commandStringToArray(values.cmd);
|
config.Cmd = commandStringToArray(values.cmd);
|
||||||
|
} else if (values.cmd === null) {
|
||||||
|
delete config.Cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (values.entrypoint) {
|
if (values.entrypoint) {
|
||||||
config.Entrypoint = commandStringToArray(values.entrypoint);
|
config.Entrypoint = commandStringToArray(values.entrypoint);
|
||||||
|
} else if (values.entrypoint === null) {
|
||||||
|
delete config.Entrypoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
|
|
Loading…
Reference in New Issue