This change allows operators to specify a DOCKER_BIN environment variable. This will specify a binary to run when executing docker, which is useful in cases where the 'docker' command being run must be modified in a way that would otherwise be invasive to Dokku, but minimalistic if done within a wrapper.
35 lines
1006 B
Bash
Executable File
35 lines
1006 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
dokku_report_cmd() {
|
|
declare desc="reports dokku vitals for troubleshooting"
|
|
local cmd="report"
|
|
declare APP="$2"
|
|
|
|
dokku_log_info1 "uname: $(uname -a)"
|
|
dokku_log_info1 "memory: "
|
|
free -m | sed "s/^/ /"
|
|
dokku_log_info1 "docker version: "
|
|
"$DOCKER_BIN" version | sed "s/^/ /"
|
|
dokku_log_info1 "docker daemon info: "
|
|
"$DOCKER_BIN" -D info | sed "s/^/ /"
|
|
dokku_log_info1 "sigil version: $(sigil -v)"
|
|
dokku_log_info1 "herokuish version: "
|
|
"$DOCKER_BIN" run --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
|
dokku_log_info1 "dokku version: $(dokku version)"
|
|
dokku_log_info1 "dokku plugins: "
|
|
dokku plugin:list | sed "s/^/ /"
|
|
|
|
if [[ "$APP" == "--all" ]]; then
|
|
for app in $(dokku_apps); do
|
|
plugn trigger report "$app"
|
|
done
|
|
elif [[ -n "$APP" ]]; then
|
|
plugn trigger report "$APP"
|
|
fi
|
|
}
|
|
|
|
dokku_report_cmd "$@"
|