From f498138d4b38c40ca7f0ad9390dbaacac1b8c8b8 Mon Sep 17 00:00:00 2001 From: mag37 Date: Tue, 11 Jul 2023 23:05:34 +0200 Subject: [PATCH 1/3] Added recent "exclude containers"-bugfix to the dc_brief.sh --- dc_brief.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dc_brief.sh b/dc_brief.sh index 0982e3b..5a15220 100755 --- a/dc_brief.sh +++ b/dc_brief.sh @@ -16,7 +16,8 @@ IFS=',' read -r -a Excludes <<< "$Exclude" ; unset IFS SearchName="$1" for i in $(docker ps --filter "name=$SearchName" --format '{{.Names}}') ; do - [[ " ${Excludes[*]} " =~ ${i} ]] && continue; # Skip if the container is excluded + for e in "${Excludes[@]}" ; do [[ "$i" == "$e" ]] && continue 2 ; done + # [[ " ${Excludes[*]} " =~ ${i} ]] && continue; # Skip if the container is excluded printf ". " RepoUrl=$(docker inspect "$i" --format='{{.Config.Image}}') LocalHash=$(docker image inspect "$RepoUrl" --format '{{.RepoDigests}}') From b492aacf0f2d5b12db679ce4bb6aa02c756b9236 Mon Sep 17 00:00:00 2001 From: mag37 Date: Tue, 11 Jul 2023 23:11:14 +0200 Subject: [PATCH 2/3] minor edits --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7170cce..4b6e3d9 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ Options: -h Print this Help. -a|y Automatic updates, without interaction. -n No updates, only checking availability. --p Auto-Prune dangling images after update. -e Exclude containers, separated by comma. +-p Auto-Prune dangling images after update. -r Allow updating images for docker run, wont update the container. ``` @@ -87,7 +87,7 @@ dockcheck is created and released under the [GNU GPL v3.0](https://www.gnu.org/l ___ ## Check out a spinoff brother-project: -### [Palleri/dockcheck-web](https://github.com/Palleri/dockcheck-web) for a WebUI-front! +### [Palleri/DCW](https://github.com/Palleri/DCW) for a WebUI-front with exporters and notifications. ## Special Thanks: - :bison: [t0rnis](https://github.com/t0rnis) From 0c33f581f702976d2f5ce9e53a2bd639f13eaa1c Mon Sep 17 00:00:00 2001 From: mag37 Date: Tue, 11 Jul 2023 23:30:46 +0200 Subject: [PATCH 3/3] Removed old exclude-logic --- dc_brief.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/dc_brief.sh b/dc_brief.sh index 5a15220..c188ae0 100755 --- a/dc_brief.sh +++ b/dc_brief.sh @@ -17,7 +17,6 @@ SearchName="$1" for i in $(docker ps --filter "name=$SearchName" --format '{{.Names}}') ; do for e in "${Excludes[@]}" ; do [[ "$i" == "$e" ]] && continue 2 ; done - # [[ " ${Excludes[*]} " =~ ${i} ]] && continue; # Skip if the container is excluded printf ". " RepoUrl=$(docker inspect "$i" --format='{{.Config.Image}}') LocalHash=$(docker image inspect "$RepoUrl" --format '{{.RepoDigests}}')