fix(rootless): run docker ps inside the install-user shell when restarting all containers

dockerStartAllApps expanded $(docker ps -a -q) in the outer control-plane
shell, which has no DOCKER_HOST and so hit the nonexistent rooted socket at
/var/run/docker.sock. In rootless mode that connection fails, the
substitution returns empty, and 'docker restart' is then called with no
arguments. Push the whole pipeline into dockerCommandRun (matching
dockerRestartApp) and guard with xargs -r so it runs against the rootless
socket and no-ops cleanly when there are no containers.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
librelad 2026-05-24 13:02:44 +01:00
parent 2a4e81025f
commit ee4f7cedbf

View File

@ -3,6 +3,6 @@
dockerStartAllApps()
{
isNotice "Please wait for docker containers to start"
local result=$(dockerCommandRun "docker restart $(docker ps -a -q)")
local result=$(dockerCommandRun "docker ps -a -q | xargs -r docker restart")
checkSuccess "Starting up all docker containers"
}