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() {
|
execute_script() {
|
||||||
declare desc="executes appropriate phase script key from app.json"
|
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 PHASE_SCRIPT_KEY="$3"
|
||||||
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
|
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
|
||||||
if [[ -n "$SCRIPT_CMD" ]];then
|
if [[ -n "$SCRIPT_CMD" ]];then
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ dokku_run_cmd() {
|
|||||||
declare desc="runs command in container based on app image"
|
declare desc="runs command in container based on app image"
|
||||||
local cmd="run"
|
local cmd="run"
|
||||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
[[ -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"
|
verify_app_name "$APP"
|
||||||
|
|
||||||
shift 2
|
shift 2
|
||||||
|
|||||||
Reference in New Issue
Block a user