mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-18 10:27:54 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
730dba5c3d | ||
|
|
f8455d3787 | ||
|
|
bbe9164554 | ||
|
|
5d86c79710 | ||
|
|
b0f8431dbf |
@@ -17,7 +17,7 @@
|
||||
___
|
||||
## :bell: Changelog
|
||||
|
||||
- **v0.4.2**: Added timeout option to skip container if registry check takes too long (10s default).
|
||||
- **v0.4.3**: Added timeout option to skip container if registry check takes too long (10s default).
|
||||
- **v0.4.1**: Syntax and logic cleanups, bugfixes on multi compose and env-files.
|
||||
- **v0.4.0**: Reworked selfupdate (auto git/curl/wget), general syntax cleanup, added -v for version.
|
||||
- **v0.3.8**: Fixed `--env-file` logic to work with multiple env-files.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
VERSION="v0.4.2"
|
||||
### ChangeNotes: Added timeout option to skip container if registry check takes too long (10s default).
|
||||
VERSION="v0.4.4"
|
||||
### ChangeNotes: Bugfix for non amd64/arm64 arch with new timeout function.
|
||||
Github="https://github.com/mag37/dockcheck"
|
||||
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"
|
||||
|
||||
@@ -44,6 +44,7 @@ c_blue="\033[0;34m"
|
||||
c_teal="\033[0;36m"
|
||||
c_reset="\033[0m"
|
||||
|
||||
Timeout=10
|
||||
Stopped=""
|
||||
while getopts "aynpfrhlisvme:d:t:" options; do
|
||||
case "${options}" in
|
||||
@@ -57,7 +58,7 @@ while getopts "aynpfrhlisvme:d:t:" options; do
|
||||
e) Exclude=${OPTARG} ;;
|
||||
m) declare c_{red,green,yellow,blue,teal,reset}="" ;;
|
||||
s) Stopped="-a" ;;
|
||||
t) Timeout="${OPTARG:-10}" ;;
|
||||
t) Timeout="${OPTARG}" ;;
|
||||
v) printf "%s\n" "$VERSION" ; exit 0 ;;
|
||||
d) DaysOld=${OPTARG}
|
||||
if ! [[ $DaysOld =~ ^[0-9]+$ ]] ; then { printf "Days -d argument given (%s) is not a number.\n" "${DaysOld}" ; exit 2 ; } ; fi ;;
|
||||
@@ -225,7 +226,7 @@ for i in $(docker ps $Stopped --filter "name=$SearchName" --format '{{.Names}}')
|
||||
RepoUrl=$(docker inspect "$i" --format='{{.Config.Image}}')
|
||||
LocalHash=$(docker image inspect "$RepoUrl" --format '{{.RepoDigests}}')
|
||||
### Checking for errors while setting the variable:
|
||||
if RegHash=$(timeout ${Timeout} $regbin image digest --list "$RepoUrl" 2>&1) ; then
|
||||
if RegHash=$(timeout --foreground ${Timeout} $regbin image digest --list "$RepoUrl" 2>&1) ; then
|
||||
if [[ "$LocalHash" = *"$RegHash"* ]] ; then
|
||||
NoUpdates+=("$i")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user