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
Plaintext
14 lines
492 B
Plaintext
2 years ago
|
#!/usr/bin/env bash
|
||
|
# Outputs information about the current docker status
|
||
2 years ago
|
EXISTS=$(which docker)
|
||
|
if [[ -z $EXISTS ]] ; then
|
||
|
echo ""
|
||
|
else
|
||
|
DOCKER_STATUS=$(docker info)
|
||
2 years ago
|
#CONTAINERS=$(echo "$DOCKER_STATUS" | awk '/Containers/ {print $2}')
|
||
2 years ago
|
RUNNING=$(echo "$DOCKER_STATUS" | awk '/Running/ {print $2}')
|
||
2 years ago
|
#STOPPED=$(echo "$DOCKER_STATUS" | awk '/Stopped/ {print $2}')
|
||
2 years ago
|
IMAGES=$(echo "$DOCKER_STATUS" | awk '/Images/ {print $2}')
|
||
2 years ago
|
echo -e "\ue7b0 $RUNNING \uf1c5 $IMAGES"
|
||
2 years ago
|
fi
|