#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/tags/functions"

tags_main_cmd() {
  declare desc="shows docker images tags for app via command line"
  local cmd="tags"
  [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
  local APP="$2"; local IMAGE_REPO=$(get_app_image_repo "$APP")
  verify_app_name "$APP"

  dokku_log_info2_quiet "Image tags for $IMAGE_REPO"
  docker images "$IMAGE_REPO"
}

tags_main_cmd "$@"
