You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
492 B
Bash
14 lines
492 B
Bash
#!/usr/bin/env bash
|
|
# Outputs information about the current docker status
|
|
EXISTS=$(which docker)
|
|
if [[ -z $EXISTS ]] ; then
|
|
echo ""
|
|
else
|
|
DOCKER_STATUS=$(docker info)
|
|
#CONTAINERS=$(echo "$DOCKER_STATUS" | awk '/Containers/ {print $2}')
|
|
RUNNING=$(echo "$DOCKER_STATUS" | awk '/Running/ {print $2}')
|
|
#STOPPED=$(echo "$DOCKER_STATUS" | awk '/Stopped/ {print $2}')
|
|
IMAGES=$(echo "$DOCKER_STATUS" | awk '/Images/ {print $2}')
|
|
echo -e "\ue7b0 $RUNNING \uf1c5 $IMAGES"
|
|
fi
|