Display image & version in list

This commit is contained in:
Loïc Guitaut
2015-09-15 23:49:51 +02:00
parent 3a824c38ca
commit 21a5d29581
3 changed files with 14 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ service_list() {
else
dokku_log_info1_quiet "$PLUGIN_SERVICE services:"
for SERVICE in $SERVICES; do
dokku_log_verbose "$SERVICE $(service_status "$SERVICE")$(service_exposed_ports "$SERVICE")"
dokku_log_verbose "$SERVICE, $(service_version "$SERVICE") $(service_status "$SERVICE")$(service_exposed_ports "$SERVICE")"
done
fi
}
@@ -270,3 +270,9 @@ get_service_name() {
local SERVICE="$1"
echo "dokku.${PLUGIN_COMMAND_PREFIX}.$SERVICE"
}
service_version() {
local SERVICE="$1"
local SERVICE_NAME="$(get_service_name "$SERVICE")"
docker inspect -f '{{.Config.Image}}' "$SERVICE_NAME"
}