feat: allow setting DOCKER_BIN path for docker execution

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.
This commit is contained in:
Jose Diaz-Gonzalez committed 2019-05-29 00:46:19 -04:00
1 parent 0e03c82139
commit 785d9b4937
33 files changed
+155 -106

No files matched your search

@@ -33,10 +33,10 @@ scheduler-docker-local-scheduler-logs() {
local CID=$(<"${CONTAINERS[i]}")
local COLOR=${COLORS[i % ${#COLORS[*]}]}
if [[ $PRETTY_PRINT == "true" ]]; then
local DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs $DOKKU_LOGS_ARGS $CID 2>&1)"
else
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
local DOKKU_LOGS_CMD+="(docker logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
fi
if [[ $i != "$MAX_INDEX" ]]; then
local DOKKU_LOGS_CMD+="& "