fix: respect DOKKU_LIB_HOST_ROOT for storage bind mounts

When Dokku runs in Docker with a shared socket, create/chown still use
DOKKU_LIB_ROOT inside the container, but Docker -v flags for storage:exec
and deploy must use DOKKU_LIB_HOST_ROOT so the daemon mounts the host data
volume instead of the real host's /var/lib/dokku.

Closes #9126.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-10-16 11:52:01 -04:00
1 parent b82f4718c8
commit cbde55a4a0
8 files changed
+103 -3

No files matched your search

@@ -137,7 +137,7 @@ func buildDockerExecArgs(entry *storage.Entry, input StorageExecInput) ([]string
args = append(args, "--user", user)
}
args = append(args, "-v", fmt.Sprintf("%s:/data", entry.HostPath))
args = append(args, "-v", fmt.Sprintf("%s:/data", storage.HostPathForDocker(entry.HostPath)))
args = append(args, input.Image)
args = append(args, cmd...)
return args, nil