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

+1 -1
View File
@@ -14,7 +14,7 @@ scheduler-docker-local-pre-restore() {
# delete all "old" containers
# shellcheck disable=SC2046
docker rm $(docker ps --format "{{.Names}}" -a -f "label=$DOKKU_CONTAINER_LABEL" -q | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &>/dev/null || true
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps --format "{{.Names}}" -a -f "label=$DOKKU_CONTAINER_LABEL" -q | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &>/dev/null || true
}
scheduler-docker-local-pre-restore "$@"