From fc2041a50c1d2a7defd655dbb71d607f080f8a44 Mon Sep 17 00:00:00 2001 From: Meghdad <61308304+MeghdadFadaee@users.noreply.github.com> Date: Thu, 13 Aug 2026 03:38:15 +0330 Subject: [PATCH] fix(installer): resolve built image by explicit tag --- scripts/install-server.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/install-server.sh b/scripts/install-server.sh index dda2cfb..34031be 100755 --- a/scripts/install-server.sh +++ b/scripts/install-server.sh @@ -10,6 +10,7 @@ readonly CERTBOT_WEBROOT="/var/www/certbot" readonly CERTBOT_HOOK="/etc/letsencrypt/renewal-hooks/deploy/meovv-mail" readonly MAILCTL_BIN="/usr/local/bin/mailctl" readonly MANAGED_MARKER="Managed by MEOVV Mail installer" +readonly MEOVV_RELEASE="0.1.0" COMMAND="" MAIL_HOSTNAME="" @@ -366,13 +367,14 @@ compose() { build_and_install_mailctl() { log "Building the pinned MEOVV application image" - MAIL_HOSTNAME="$MAIL_HOSTNAME" MEOVV_VERSION=0.1.0 compose build meovv + MAIL_HOSTNAME="$MAIL_HOSTNAME" MEOVV_VERSION="$MEOVV_RELEASE" compose build meovv - local image_id temporary_binary - image_id="$(MAIL_HOSTNAME="$MAIL_HOSTNAME" MEOVV_VERSION=0.1.0 compose images -q meovv)" - [[ -n "$image_id" ]] || die "the MEOVV image was not created" + local image_ref temporary_binary + image_ref="meovv-mail:$MEOVV_RELEASE" + docker image inspect "$image_ref" >/dev/null 2>&1 || \ + die "the expected MEOVV image $image_ref was not created" - TEMP_CONTAINER="$(docker create "$image_id")" + TEMP_CONTAINER="$(docker create "$image_ref")" temporary_binary="$(mktemp /tmp/meovv-mailctl.XXXXXX)" TEMP_FILES+=("$temporary_binary") docker cp "$TEMP_CONTAINER:/usr/local/bin/mailctl" "$temporary_binary"