Files
dokku/plugins/builder-pack/docker-args-process-deploy
Jose Diaz-Gonzalez 3a7d74cdaa fix: ensure leading space when injecting --entrypoint launcher
The trigger output started with `--entrypoint` and relied on the caller
to provide a trailing space. `scheduler-deploy-process-container` does
that, but `scheduler-run` does not when `DOKKU_TRACE` is unset, so the
flag concatenated onto the previous arg as `--env=KEY--entrypoint`,
leaving `launcher` as the image positional argument and causing
`docker container create` to fail with `Unable to find image 'launcher:latest'`.
Match the leading-space convention used by the other docker-args triggers
(`config/docker-args-run`, `builder-herokuish/docker-args-run`).
2026-04-29 05:48:43 -04:00

30 lines
896 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-builder-pack-docker-args-process-deploy() {
declare desc="builder-pack core-post-deploy plugin trigger"
declare trigger="docker-args-process-deploy"
declare APP="$1" IMAGE_SOURCE_TYPE="$2" IMAGE_TAG="$3" PROC_TYPE="$4"
local STDIN=$(cat)
local inject_launcher output
if [[ "$IMAGE_SOURCE_TYPE" != "pack" ]]; then
return
fi
inject_launcher=true
if [[ -n "$IMAGE_TAG" ]] && [[ -n "$PROC_TYPE" ]] && [[ -z "$(plugn trigger procfile-get-command "$APP" "$PROC_TYPE" "5000" 2>/dev/null || echo '')" ]]; then
inject_launcher=false
fi
if [[ "$inject_launcher" == "true" ]]; then
# without this, the command and arguments are passed as args to the default process type
output=" --entrypoint launcher"
fi
echo -n "$STDIN$output"
}
trigger-builder-pack-docker-args-process-deploy "$@"