Archived
fix(installer): resolve built image by explicit tag
This commit is contained in:
1 file changed
+7
-5
@@ -10,6 +10,7 @@ readonly CERTBOT_WEBROOT="/var/www/certbot"
|
|||||||
readonly CERTBOT_HOOK="/etc/letsencrypt/renewal-hooks/deploy/meovv-mail"
|
readonly CERTBOT_HOOK="/etc/letsencrypt/renewal-hooks/deploy/meovv-mail"
|
||||||
readonly MAILCTL_BIN="/usr/local/bin/mailctl"
|
readonly MAILCTL_BIN="/usr/local/bin/mailctl"
|
||||||
readonly MANAGED_MARKER="Managed by MEOVV Mail installer"
|
readonly MANAGED_MARKER="Managed by MEOVV Mail installer"
|
||||||
|
readonly MEOVV_RELEASE="0.1.0"
|
||||||
|
|
||||||
COMMAND=""
|
COMMAND=""
|
||||||
MAIL_HOSTNAME=""
|
MAIL_HOSTNAME=""
|
||||||
@@ -366,13 +367,14 @@ compose() {
|
|||||||
|
|
||||||
build_and_install_mailctl() {
|
build_and_install_mailctl() {
|
||||||
log "Building the pinned MEOVV application image"
|
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
|
local image_ref temporary_binary
|
||||||
image_id="$(MAIL_HOSTNAME="$MAIL_HOSTNAME" MEOVV_VERSION=0.1.0 compose images -q meovv)"
|
image_ref="meovv-mail:$MEOVV_RELEASE"
|
||||||
[[ -n "$image_id" ]] || die "the MEOVV image was not created"
|
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)"
|
temporary_binary="$(mktemp /tmp/meovv-mailctl.XXXXXX)"
|
||||||
TEMP_FILES+=("$temporary_binary")
|
TEMP_FILES+=("$temporary_binary")
|
||||||
docker cp "$TEMP_CONTAINER:/usr/local/bin/mailctl" "$temporary_binary"
|
docker cp "$TEMP_CONTAINER:/usr/local/bin/mailctl" "$temporary_binary"
|
||||||
|
|||||||
Reference in new issue
Block a user