Merge pull request #8266 from dokku/6847-allow-force-pull-image-on-git-from-image

Add a method to force build when re-using an image with git:from-image
This commit is contained in:
Jose Diaz-Gonzalez
2026-01-08 12:11:54 -05:00
committed by GitHub
4 changed files with 48 additions and 4 deletions

View File

@@ -141,7 +141,7 @@ cmd-git-from-image() {
local cmd="git:from-image"
[[ "$1" == "$cmd" ]] && shift 1
declare APP DOCKER_IMAGE USER_NAME USER_EMAIL
local BUILD_DIR
local BUILD_DIR FORCE=false
ARGS=()
skip=false
@@ -151,6 +151,11 @@ cmd-git-from-image() {
continue
fi
if [[ "$arg" == "--force" ]]; then
FORCE=true
continue
fi
if [[ "$skip" == "true" ]]; then
BUILD_DIR="$arg"
skip=false
@@ -168,6 +173,10 @@ cmd-git-from-image() {
verify_app_name "$APP"
[[ -z "$DOCKER_IMAGE" ]] && dokku_log_fail "Please specify a docker image"
if [[ "$FORCE" == "true" ]]; then
export DOKKU_APPS_FORCE_DELETE=1
fi
if ! plugn trigger git-from-image "$APP" "$DOCKER_IMAGE" "$BUILD_DIR" "$USER_NAME" "$USER_EMAIL"; then
return 1
fi