修复自动备份真实挂载解析(07-27-automatic-offhost-backup)
ci-e2e / e2e (push) Waiting to run
ci-minimal / check-minimal (push) Waiting to run

这个提交包含在:
2026-07-27 11:19:13 +08:00
父节点 b78f2a11ce
当前提交 9875bc37a4
共修改 5 个文件,包含 34 行新增和 5 行删除
+12 -2
查看文件
@@ -134,8 +134,18 @@ container_env() {
mount_source() {
local container_id="$1"
local destination="$2"
docker inspect -f '{{range .Mounts}}{{println .Destination "\t" .Source}}{{end}}' "$container_id" \
| awk -F '\t' -v expected="$destination" '$1 == expected { print $2 }'
docker inspect -f '{{json .Mounts}}' "$container_id" \
| python3 -c '
import json
import sys
destination = sys.argv[1]
mounts = json.load(sys.stdin)
matches = [mount.get("Source", "") for mount in mounts if mount.get("Destination") == destination]
if len(matches) != 1 or not matches[0]:
raise SystemExit(1)
print(matches[0])
' "$destination"
}
resolve_active_runtime() {