From 681a0e2aeeeba08b71168bff211acee8b17c5411 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 21 Oct 2026 21:55:52 +0200 Subject: [PATCH] fix(scripts): read the Coolify version from the containers files --- scripts/patch.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/patch.sh b/scripts/patch.sh index 5b785fce49..5cf29c4a0b 100755 --- a/scripts/patch.sh +++ b/scripts/patch.sh @@ -49,10 +49,8 @@ check_installation() { } read_version() { - local image - image="$(docker inspect --format '{{.Image}}' coolify 2> /dev/null)" || die "the coolify container does not exist" - # Read from the image, because the mitigation advice was to stop the coolify container - current_version="$(docker run --rm --network none --entrypoint php -w /var/www/html "$image" bootstrap/getVersion.php < /dev/null 2> /dev/null)" || die "could not read the Coolify version from the coolify container" + # Copy the file out of the container, because this also works when the mitigation advice was followed and the container is stopped + current_version="$(docker cp coolify:/var/www/html/config/constants.php - 2> /dev/null | tar -xO 2> /dev/null | awk -F "'" "/'version' =>/ && !found { print \$(NF - 1); found = 1 }")" && [ -n "$current_version" ] || die "could not read the Coolify version from the coolify container" ok "Coolify $BOLD$current_version$RESET is installed" }