Merge pull request #39 from mag37/fixing
Fixes `dc_brief.sh` to only exclude exact matches.
This commit is contained in:
commit
9a246b52c4
@ -44,8 +44,8 @@ Options:
|
|||||||
-h Print this Help.
|
-h Print this Help.
|
||||||
-a|y Automatic updates, without interaction.
|
-a|y Automatic updates, without interaction.
|
||||||
-n No updates, only checking availability.
|
-n No updates, only checking availability.
|
||||||
-p Auto-Prune dangling images after update.
|
|
||||||
-e Exclude containers, separated by comma.
|
-e Exclude containers, separated by comma.
|
||||||
|
-p Auto-Prune dangling images after update.
|
||||||
-r Allow updating images for docker run, wont update the container.
|
-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:
|
## 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:
|
## Special Thanks:
|
||||||
- :bison: [t0rnis](https://github.com/t0rnis)
|
- :bison: [t0rnis](https://github.com/t0rnis)
|
||||||
|
@ -16,7 +16,7 @@ IFS=',' read -r -a Excludes <<< "$Exclude" ; unset IFS
|
|||||||
SearchName="$1"
|
SearchName="$1"
|
||||||
|
|
||||||
for i in $(docker ps --filter "name=$SearchName" --format '{{.Names}}') ; do
|
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
|
||||||
printf ". "
|
printf ". "
|
||||||
RepoUrl=$(docker inspect "$i" --format='{{.Config.Image}}')
|
RepoUrl=$(docker inspect "$i" --format='{{.Config.Image}}')
|
||||||
LocalHash=$(docker image inspect "$RepoUrl" --format '{{.RepoDigests}}')
|
LocalHash=$(docker image inspect "$RepoUrl" --format '{{.RepoDigests}}')
|
||||||
|
Loading…
Reference in New Issue
Block a user