create get_app_image_repo() to define our app image pattern and use it
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user