From 85e86abbce0c6698ecbfb117051e686e877d9574 Mon Sep 17 00:00:00 2001 From: zhouyonggao <1971162852@qq.com> Date: Fri, 28 Nov 2025 16:24:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(deploy=5Fimage):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=B9=B3=E5=8F=B0=E8=AE=BE=E7=BD=AE=E5=B9=B6?= =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=B9=B3=E5=8F=B0=E5=8F=82=E6=95=B0=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改部署脚本以支持动态平台参数,移除默认的linux/amd64设置 在帮助信息中添加平台参数说明 --- scripts/deploy_image.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/deploy_image.sh b/scripts/deploy_image.sh index 7949597..d430157 100644 --- a/scripts/deploy_image.sh +++ b/scripts/deploy_image.sh @@ -4,7 +4,7 @@ set -euo pipefail ENV=${1:-test} IMAGE=${2:-marketingsystemdatatool_msdt:latest} CMD=${3:-up} -PLATFORM=${PLATFORM:-linux/amd64} +PLATFORM=${PLATFORM:-} ROOT_DIR=$(cd "$(dirname "$0")/.." && pwd) @@ -17,8 +17,9 @@ fi case "$CMD" in up) docker rm -f msdt >/dev/null 2>&1 || true - docker run -d --name msdt \ - --platform "$PLATFORM" \ + PLATFORM_FLAG="" + if [ -n "$PLATFORM" ]; then PLATFORM_FLAG="--platform $PLATFORM"; fi + docker run -d --name msdt $PLATFORM_FLAG \ -p 8077:8077 \ -e APP_ENV="$ENV" \ -e MARKETING_DB_HOST="${MARKETING_DB_HOST:-}" \ @@ -41,5 +42,6 @@ case "$CMD" in docker logs -f msdt ;; *) echo "usage: deploy_image.sh [up|down|restart|logs]" >&2 + echo "env overrides: set PLATFORM=linux/amd64 or PLATFORM=linux/arm64 if needed" >&2 exit 1 ;; esac