#!/bin/bash # 清理未使用的 Docker 资源,但不删除 volumes echo "正在清理未使用的 Docker 资源,保留 volumes..." docker system prune # 输出清理结果 echo "清理完成。"