Skip to content
Snippets Groups Projects
Commit 9adc3877 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'docker-checks' into 'master'

do not show containers if total is zero

See merge request !232
parents f19ded5f 8969321f
No related branches found
No related tags found
1 merge request!232do not show containers if total is zero
...@@ -151,7 +151,7 @@ ph.perfadd "images" "$iImages" ...@@ -151,7 +151,7 @@ ph.perfadd "images" "$iImages"
ph.status "Docker $sVersion ($sLicense) .. containers: $iCTotal running: $iCRunning paused: $iCPaused stopped: $iCStopped .. images: $iImages" ph.status "Docker $sVersion ($sLicense) .. containers: $iCTotal running: $iCRunning paused: $iCPaused stopped: $iCStopped .. images: $iImages"
echo "$out" echo "$out"
if [ $bOptContainers -eq 1 ]; then if [ $bOptContainers -eq 1 ] && [ "$iCTotal" -gt "0" ]; then
echo echo
echo "Containers:" echo "Containers:"
containers=$( sudo -n --preserve-env docker ps --all --format "{{ json . }}" --all 2>/dev/null ) containers=$( sudo -n --preserve-env docker ps --all --format "{{ json . }}" --all 2>/dev/null )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment