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:
1 parent
0e03c82139
commit
785d9b4937
33 files changed
+155
-106
No files matched your search
@@ -21,10 +21,10 @@ scheduler-docker-local-scheduler-stop() {
|
||||
if [[ -n "$DOKKU_APP_RUNNING_CONTAINER_IDS" ]]; then
|
||||
# Disable the container restart policy
|
||||
# shellcheck disable=SC2086
|
||||
docker container update --restart=no $DOKKU_APP_RUNNING_CONTAINER_IDS &>/dev/null || true
|
||||
"$DOCKER_BIN" container update --restart=no $DOKKU_APP_RUNNING_CONTAINER_IDS &>/dev/null || true
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker stop $DOCKER_STOP_TIME_ARG $DOKKU_APP_RUNNING_CONTAINER_IDS >/dev/null || true
|
||||
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG $DOKKU_APP_RUNNING_CONTAINER_IDS >/dev/null || true
|
||||
fi
|
||||
|
||||
if [[ "$REMOVE_CONTAINERS" == "true" ]]; then
|
||||
@@ -32,7 +32,7 @@ scheduler-docker-local-scheduler-stop() {
|
||||
|
||||
if [[ -n "$DOKKU_APP_CIDS" ]]; then
|
||||
# shellcheck disable=SC2086
|
||||
docker rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
|
||||
"$DOCKER_BIN" rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user