mirror of
https://github.com/dokku/dokku.git
synced 2025-12-28 16:06:40 +01:00
Use the deployed image name when running deploy tasks or running arbitrary commands
This ensures the proper image is in use, regardless of the phase in which dokku creates a docker container.
This commit is contained in:
@@ -23,7 +23,7 @@ get_phase_script() {
|
||||
|
||||
execute_script() {
|
||||
declare desc="executes appropriate phase script key from app.json"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local PHASE_SCRIPT_KEY="$3"
|
||||
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
|
||||
if [[ -n "$SCRIPT_CMD" ]];then
|
||||
|
||||
@@ -8,7 +8,7 @@ dokku_run_cmd() {
|
||||
declare desc="runs command in container based on app image"
|
||||
local cmd="run"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"; local IMAGE_TAG=$(get_running_image_tag "$APP"); local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local APP="$2"; local IMAGE_TAG=$(get_running_image_tag "$APP"); local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
verify_app_name "$APP"
|
||||
|
||||
shift 2
|
||||
|
||||
Reference in New Issue
Block a user