Repository navigation
Description
Description
In Edit container → Update container, clearing the optional Command field (non-empty → empty) appears to succeed, but the container still runs the previous command. Re-opening Edit shows the old value; it never becomes empty / image default.
This is the same “empty means absent, not cleared” merge as #1119 / #747 / #892, but Command was not included in the #1119 null-vs-omit fix.
In EditContainerModal.svelte, the update payload comment already documents the contract:
send
nullwhen the user cleared them so the server can distinguish "cleared" from "absent" (#1119). … explicit null = clear; undefined would be dropped by JSON.stringify and the merge would preserve the old value.
env, memory, user, etc. follow that (?? null / || null). Command does not:
const cmd = command.trim() ? parseShellCommand(command.trim()) : undefined;
// …
const payload = {
// …
cmd, // omitted from JSON when empty → server keeps old Cmd
};Expected: empty Command → send cmd: null → recreate without a user override so Docker uses the image CMD.
Not a duplicate of #1371 (that was auto-update keeping the old image Cmd when the new image Cmd changed).
Steps to reproduce
- Create or edit a container and set Command (optional) to a non-empty override (e.g.
sleep 9999). Update container. - Confirm inspect / Edit still shows that command.
- Edit container again. Clear Command (optional) so the field is empty.
- Click Update container.
- Re-open Edit (or
docker inspectConfig.Cmd).
Expected
Command is empty / image default CMD.
Actual
Command remains the previous override. Update reports success.
Logs
N/A — UI-only; no Dockhand error. The POST /api/containers/{id}/update body omits `cmd` when the field is cleared (JSON.stringify drops `undefined`). When Command is filled, `cmd` is an array in the same body.Browser logs
N/A — compare the update POST: cleared Command has no `cmd` key; non-empty Command has `"cmd": [ … ]`.Dockhand version
Current main (EditContainerModal.svelte still uses cmd = … : undefined). Please fill Settings → About if you need a specific build.
Hawser version (if used)
No response
Connection mode
socket (likely irrelevant; payload is built in the UI)
Please confirm the following
- I have already searched for relevant existing issues and discussions before opening this report.
- I have updated the title field above with a concise description.
Activity
jotka commentedon Sep 23, 2026
released
fnsys/dockhand:v1.0.49fnsys/dockhand:latestfnsys/dockhand:v1.0.49-baselinefnsys/dockhand:latest-baselinefnsys/dockhand:baselineUpdate fnsys/dockhand Docker tag to v1.0.49 (#55)