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

do not show containers if total is zero

parent 29de6639
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"
ph.status "Docker $sVersion ($sLicense) .. containers: $iCTotal running: $iCRunning paused: $iCPaused stopped: $iCStopped .. images: $iImages"
echo "$out"
if [ $bOptContainers -eq 1 ]; then
if [ $bOptContainers -eq 1 ] && [ "$iCTotal" -gt "0" ]; then
echo
echo "Containers:"
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