Move dokku cleanup into docker_cleanup function
This should slightly reduce DOKKU_TRACE output.
This commit is contained in:
1 parent
7a1c080051
commit
342e9aa95b
2 files changed
+11
-7
No files matched your search
@@ -53,7 +53,7 @@ case "$1" in
|
|||||||
receive)
|
receive)
|
||||||
APP="$2"; IMAGE=$(get_app_image_name $APP); IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
APP="$2"; IMAGE=$(get_app_image_name $APP); IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
||||||
dokku_log_info1 "Cleaning up..."
|
dokku_log_info1 "Cleaning up..."
|
||||||
dokku cleanup
|
docker_cleanup
|
||||||
dokku_log_info1 "Building $APP from $IMAGE_SOURCE_TYPE..."
|
dokku_log_info1 "Building $APP from $IMAGE_SOURCE_TYPE..."
|
||||||
dokku build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"
|
dokku build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"
|
||||||
release_and_deploy "$APP"
|
release_and_deploy "$APP"
|
||||||
@@ -192,12 +192,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
cleanup)
|
cleanup)
|
||||||
# delete all non-running container
|
docker_cleanup
|
||||||
# shellcheck disable=SC2046
|
|
||||||
docker rm $(docker ps -a -f 'status=exited' -q) &> /dev/null || true
|
|
||||||
# delete unused images
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
docker rmi $(docker images -f 'dangling=true' -q) &> /dev/null &
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
plugins)
|
plugins)
|
||||||
|
|||||||
@@ -320,3 +320,12 @@ release_and_deploy() {
|
|||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
docker_cleanup() {
|
||||||
|
# delete all non-running container
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm $(docker ps -a -f 'status=exited' -q) &> /dev/null || true
|
||||||
|
# delete unused images
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rmi $(docker images -f 'dangling=true' -q) &> /dev/null &
|
||||||
|
}
|
||||||
Reference in new issue
Block a user