docker system prune
清理结果如下
docker system prune
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all dangling build cache
Are you sure you want to continue? [y/N]
Total reclaimed space: 22.15GB
du -sh ~/Library/Containers/com.docker.docker/Data
还有20个 G,清理了不少,你也可以按以下步骤挨个清理
docker container prune
docker container prune --filter "until=24h"
docker image prune
docker image prune -a --filter "until=24h"
docker volume prune