mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-14 23:38:15 +01:00
cleaned up the config info queries
This commit is contained in:
parent
9c44a5176d
commit
eeb719296d
1 changed files with 3 additions and 7 deletions
10
dockcheck.sh
10
dockcheck.sh
|
|
@ -554,13 +554,9 @@ if [[ -n "${GotUpdates:-}" ]]; then
|
||||||
for i in "${SelectedUpdates[@]}"; do
|
for i in "${SelectedUpdates[@]}"; do
|
||||||
((CurrentQue+=1))
|
((CurrentQue+=1))
|
||||||
printf "\n%bNow updating (%s/%s): %b%s%b\n" "$c_teal" "$CurrentQue" "$NumberofUpdates" "$c_blue" "$i" "$c_reset"
|
printf "\n%bNow updating (%s/%s): %b%s%b\n" "$c_teal" "$CurrentQue" "$NumberofUpdates" "$c_blue" "$i" "$c_reset"
|
||||||
# ContLabels=$(docker inspect "$i" --format '{{json .Config.Labels}}')
|
|
||||||
# ContImage=$(docker inspect "$i" --format='{{.Config.Image}}')
|
|
||||||
# ContPath=$($jqbin -r '."com.docker.compose.project.working_dir"' <<< "$ContLabels")
|
|
||||||
ContConfig=$(docker inspect "$i" --format '{{json .}}')
|
ContConfig=$(docker inspect "$i" --format '{{json .}}')
|
||||||
ContImage=$($jqbin -r '."Config"."Image"' <<< "$ContConfig") # OLD? Remove if replaced with ContFull
|
ContImage=$($jqbin -r '."Config"."Image"' <<< "$ContConfig")
|
||||||
ImageId=$($jqbin -r '."Image"' <<< "$ContConfig")
|
ImageId=$($jqbin -r '."Image"' <<< "$ContConfig")
|
||||||
# ContFull=$(docker image inspect "$ImageId" --format "{{index .RepoTags 0}}")
|
|
||||||
ContPath=$($jqbin -r '."Config"."Labels"."com.docker.compose.project.working_dir"' <<< "$ContConfig")
|
ContPath=$($jqbin -r '."Config"."Labels"."com.docker.compose.project.working_dir"' <<< "$ContConfig")
|
||||||
[[ "$ContPath" == "null" ]] && ContPath=""
|
[[ "$ContPath" == "null" ]] && ContPath=""
|
||||||
|
|
||||||
|
|
@ -598,8 +594,8 @@ if [[ -n "${GotUpdates:-}" ]]; then
|
||||||
((CurrentQue+=1))
|
((CurrentQue+=1))
|
||||||
unset CompleteConfs
|
unset CompleteConfs
|
||||||
# Extract labels and metadata
|
# Extract labels and metadata
|
||||||
ContLabels=$(docker inspect "$i" --format '{{json .Config.Labels}}')
|
ContConfig=$(docker inspect "$i" --format '{{json .}}')
|
||||||
ContImage=$(docker inspect "$i" --format='{{.Config.Image}}')
|
ContLabels=$($jqbin -r '."Config"."Labels"' <<< "$ContConfig")
|
||||||
ContPath=$($jqbin -r '."com.docker.compose.project.working_dir"' <<< "$ContLabels")
|
ContPath=$($jqbin -r '."com.docker.compose.project.working_dir"' <<< "$ContLabels")
|
||||||
[[ "$ContPath" == "null" ]] && ContPath=""
|
[[ "$ContPath" == "null" ]] && ContPath=""
|
||||||
ContConfigFile=$($jqbin -r '."com.docker.compose.project.config_files"' <<< "$ContLabels")
|
ContConfigFile=$($jqbin -r '."com.docker.compose.project.config_files"' <<< "$ContLabels")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue