mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-19 10:57:45 +00:00
Compare commits
3 Commits
85ebb0e715
...
ef0198871c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef0198871c | ||
|
|
6b3c2680d4 | ||
|
|
56d0229d6d |
@@ -13,9 +13,9 @@
|
||||
</p>
|
||||
|
||||
<h2 align="center">CLI tool to automate docker image updates or notifying when updates are available.</h2>
|
||||
<h3 align="center">selective updates, exclude containers, custom labels, notification plugins, prune when done etc.</h3>
|
||||
<h3 align="center">selective updates, include/exclude containers, image backups, custom labels, notification plugins, prune when done etc.</h3>
|
||||
|
||||
<h4 align="center">:whale: Docker Hub pull limit :chart_with_downwards_trend: not an issue for checks but for actual pulls - <a href="#whale-docker-hub-pull-limit-chart_with_downwards_trend-not-an-issue-for-checks-but-for-actual-pulls">read more</a></h4>
|
||||
<h4 align="center">:whale: Docker Hub pull limit :chart_with_downwards_trend: not an issue for checks only for actual pulls - <a href="#whale-docker-hub-pull-limit-chart_with_downwards_trend-not-an-issue-for-checks-but-for-actual-pulls">read more</a></h4>
|
||||
|
||||
<h5 align="center">For Podman - see the fork <a href="https://github.com/sudo-kraken/podcheck">sudo-kraken/podcheck</a>!</h4>
|
||||
|
||||
@@ -26,7 +26,7 @@ ___
|
||||
- Added new option **BackupForDays**; `-b N` and `-B`:
|
||||
- Backup an image before pulling a new version for easy rollback in case of breakage.
|
||||
- Removes backed up images older than *N* days.
|
||||
- List currently backed up images with `-K`.
|
||||
- List currently backed up images with `-B`.
|
||||
- **v0.7.4**:
|
||||
- Added new option `-R`:
|
||||
- Will skip container recreation after pulling images.
|
||||
|
||||
@@ -271,7 +271,7 @@ remove_backups() {
|
||||
backup_date=${backup_tag%%_*}
|
||||
# UNTAGGING HERE
|
||||
if datecheck "$backup_date" "$BackupForDays"; then
|
||||
[[ "$CleanupCount" == 0 ]] && echo "Removing backed up images older then $BackupForDays days."
|
||||
[[ "$CleanupCount" == 0 ]] && printf "\n%bRemoving backed up images older then %s days.%b\n" "$c_blue" "$BackupForDays" "$c_reset"
|
||||
docker rmi "${repo_name}:${backup_tag}" && ((CleanupCount+=1))
|
||||
fi
|
||||
done
|
||||
@@ -279,7 +279,8 @@ remove_backups() {
|
||||
if [[ "$CleanupCount" == 0 ]]; then
|
||||
printf "\nNo backup images to remove.\n"
|
||||
else
|
||||
printf "\n%b%s%b backup removed.%b\n" "$c_green" "$CleanupCount" "$c_teal" "$c_reset"
|
||||
[[ "$CleanupCount" -gt 1 ]] && b_phrase="backups" || b_phrase="backup"
|
||||
printf "\n%b%s%b %s removed.%b\n" "$c_green" "$CleanupCount" "$c_teal" "$b_phrase" "$c_reset"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user