Merge pull request #2774 from fruitl00p/docker-options-help

include docker-options in the default `dokku`
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2017-05-22 10:21:14 -06:00
commit 8602fa9e01
1 file changed
+24 -16
+24 -16
View File
@@ -2,28 +2,36 @@
[[ " help docker-options:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" [[ " help docker-options:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in docker_options_help_content_func() {
help | docker-options:help) declare desc="return docker-options plugin help content"
help_content_func () { cat<<help_content
declare desc="return docker-options plugin help content"
cat<<help_content
docker-options <app> [phase(s)], [DEPRECATED] Alternative for docker-options:report docker-options <app> [phase(s)], [DEPRECATED] Alternative for docker-options:report
docker-options:add <app> <phase(s)> OPTION, Add Docker option to app for phase (comma separated phase list) docker-options:add <app> <phase(s)> OPTION, Add Docker option to app for phase (comma separated phase list)
docker-options:remove <app> <phase(s)> OPTION, Remove Docker option from app for phase (comma separated phase list) docker-options:remove <app> <phase(s)> OPTION, Remove Docker option from app for phase (comma separated phase list)
docker-options:report [<app>] [<flag>], Displays a docker options report for one or more apps docker-options:report [<app>] [<flag>], Displays a docker options report for one or more apps
help_content help_content
} }
if [[ $1 = "docker-options:help" ]] ; then docker_options_help_cmd() {
echo -e 'Usage: dokku docker-options[:COMMAND]' if [[ $1 = "docker-options:help" ]] ; then
echo '' echo -e 'Usage: dokku docker-options[:COMMAND]'
echo 'Display app'"'"'s Docker options for all phases.' echo ''
echo '' echo 'Display app'"'"'s Docker options for all phases.'
echo 'Additional commands:' echo ''
help_content_func | sort | column -c2 -t -s, echo 'Additional commands:'
else docker_options_help_content_func | sort | column -c2 -t -s,
help_content_func elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
fi docker_options_help_content_func
else
cat<<help_desc
docker-options, Pass options to Docker the various stages of an app
help_desc
fi
}
case "$1" in
help | docker-options:help)
docker_options_help_cmd "$@"
;; ;;
*) *)