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

@@ -24,7 +24,7 @@ scheduler-docker-local-scheduler-logs-failed() {
while read -r LINE || [[ -n "$LINE" ]]; do
CID="$(echo "$LINE" | cut -d ' ' -f1)"
PREFIX="$(echo "$LINE" | cut -d ' ' -f2)"
if docker inspect "${CID}" >/dev/null 2>&1; then
if "$DOCKER_BIN" inspect "${CID}" >/dev/null 2>&1; then
RUNNING_CONTAINERS+=("$CID")
else
DEAD_CONTAINERS+=("$CID")
@@ -44,7 +44,7 @@ scheduler-docker-local-scheduler-logs-failed() {
((MAX_INDEX = ${#RUNNING_CONTAINERS[*]} - 1)) || true
for i in ${!RUNNING_CONTAINERS[*]}; do
local CID="${RUNNING_CONTAINERS[i]}"
DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
DOKKU_LOGS_CMD+="($DOCKER_BIN logs $DOKKU_LOGS_ARGS $CID 2>&1)"
if [[ $i != "$MAX_INDEX" ]]; then
local DOKKU_LOGS_CMD+="& "
else