create get_app_image_repo() to define our app image pattern and use it

This commit is contained in:
Michael Hobbs
2015-09-03 17:05:49 -07:00
parent 433db65635
commit 9c37069a6a
3 changed files with 25 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"
source "$PLUGIN_PATH/common/functions"
APP="$1"; IMAGE_REPO=$(get_app_image_repo $APP)
[[ -n $APP ]] && rm -r "$DOKKU_ROOT/$APP" > /dev/null
@@ -8,4 +9,4 @@ APP="$1"
# shellcheck disable=SC2046
docker rm -f $(docker ps -a --no-trunc | egrep "dokku/${APP}:" | awk '{ print $1 }' | xargs) &>/dev/null || true
# shellcheck disable=SC2046
docker rmi $(docker images -q $IMAGE | xargs) &>/dev/null || true
docker rmi $(docker images -q $IMAGE_REPO | xargs) &>/dev/null || true