v4.1.0版本zst压缩镜像未解压无法load问题

scripts/3_load_images.sh改动

      zstd -d -f "${IMAGE_DIR}/${filename}"
      filename_un=$(basename "${image}")
      docker load <"${IMAGE_DIR}/${filename_un}"

scripts/3_load_images.sh

#!/usr/bin/env bash
#
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

. "${BASE_DIR}/utils.sh"

cd "${BASE_DIR}" || return
IMAGE_DIR="images"

function load_image_files() {
  images=$(get_images)
  for image in ${images}; do
    filename=$(basename "${image}").zst
    filename_windows=${filename/:/_}
    if [[ -f ${IMAGE_DIR}/${filename_windows} ]]; then
      filename=${filename_windows}
    fi
    if [[ ! -f ${IMAGE_DIR}/${filename} ]]; then
      echo_red "$(gettext 'Docker image not found'): ${IMAGE_DIR}/${filename}"
      continue
    fi

    echo -n "${image} <= ${IMAGE_DIR}/${filename} "
    md5_filename=$(basename "${image}").md5
    md5_path=${IMAGE_DIR}/${md5_filename}
    image_id=$(docker inspect -f "{{.ID}}" "${image}" 2&>/dev/null || echo "")
    saved_id=""

    if [[ -f "${md5_path}" ]]; then
      saved_id=$(cat "${md5_path}")
    fi
    if [[ ${image_id} != "${saved_id}" ]]; then
      echo
      zstd -d -f "${IMAGE_DIR}/${filename}"
      filename_un=$(basename "${image}")
      docker load <"${IMAGE_DIR}/${filename_un}"
    else
      echo "$(gettext 'Docker image loaded, skipping')"
    fi
  done
}

function main() {
  if [[ -d "${IMAGE_DIR}" && $(find "${IMAGE_DIR}" -type f -name "*.zst" -print -quit 2>/dev/null) ]]; then
    load_image_files
  else
    pull_images
  fi
  echo_done
}

if [[ "$0" == "${BASH_SOURCE[0]}" ]]; then
  main
fi

报错截图,你这是改安装脚本了?有啥需求

默认的不是tar吗

你下载的是tar包啊,用tar命令,另外如果需要安装可以执行install命令。会自动关联load镜像操作

是改安装脚本了,v4.1.0里镜像包zst压缩了,脚本里没有解压,所以无法load

整包是tar,解压之后里边的镜像是zst压缩的,脚本没改,所以报错了。我上边改动是fix这个报错的。

解压后到解压目录直接执行./jmsctl.sh install