2019-01-25 17:28:29 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-01-25 08:42:22 +00:00
|
|
|
check_required() {
|
|
|
|
type docker &> /dev/null || { echo "Requiring 'docker' but it's not installed"; exit 1; }
|
|
|
|
type yes &> /dev/null || { echo "Requiring 'yes' but it's not installed"; exit 1; }
|
|
|
|
}
|
|
|
|
|
|
|
|
check_required
|
|
|
|
|
2019-01-25 17:28:29 +00:00
|
|
|
echo "Doing docker housekeeping for containers, images and volumes";
|
|
|
|
|
|
|
|
yes | docker container prune
|
|
|
|
yes | docker image prune
|
2023-04-10 17:01:52 +00:00
|
|
|
yes | docker volume prune
|
|
|
|
yes | docker network prune
|