This is an automated email from the ASF dual-hosted git repository.

lizhimins pushed a commit to branch rocketmq-studio
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git


The following commit(s) were added to refs/heads/rocketmq-studio by this push:
     new 7e7aa3443 docs(deploy): document what the server image build reads 
from its context (#5802)
7e7aa3443 is described below

commit 7e7aa3443903b19d09243821a33152f82cc9046c
Author: lizhimins <[email protected]>
AuthorDate: Fri Oct 9 19:36:30 2026 +0800

    docs(deploy): document what the server image build reads from its context 
(#5802)
---
 .claude/skills/deploy-rocketmq/SKILL.md | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/.claude/skills/deploy-rocketmq/SKILL.md 
b/.claude/skills/deploy-rocketmq/SKILL.md
index ffac840ba..ef1a793d9 100644
--- a/.claude/skills/deploy-rocketmq/SKILL.md
+++ b/.claude/skills/deploy-rocketmq/SKILL.md
@@ -102,15 +102,23 @@ XML'
 
 ```bash
 cd <项目根目录>   # rocketmq-studio 仓库根
-tar czf /tmp/src.tar.gz --exclude='web/node_modules' --exclude='web/dist' 
--exclude='server/target' server web deploy
+# rmqctl, LICENSE and NOTICE have to travel with the package: the server image 
is built with the
+# repository root as its context, and the rmqctl stage of server/Dockerfile 
copies all three.
+# deploy/.env is per-environment and rmqctl/bin is a local build artifact, so 
both stay out.
+tar czf /tmp/src.tar.gz \
+  --exclude='web/node_modules' --exclude='web/dist' --exclude='server/target' \
+  --exclude='deploy/.env' --exclude='rmqctl/bin' \
+  LICENSE NOTICE server web deploy rmqctl
 scp /tmp/src.tar.gz <user>@<host>:/opt/rocketmq-studio/
-$SSH 'cd /opt/rocketmq-studio && rm -rf server web deploy && tar xzf 
src.tar.gz && rm src.tar.gz'
+$SSH 'cd /opt/rocketmq-studio && rm -rf server web deploy rmqctl LICENSE 
NOTICE && tar xzf src.tar.gz && rm src.tar.gz'
 ```
 
 ### 4. 在目标机上编译后端 + 构建镜像
 
 复用宿主机 `~/.m2` 缓存编译 JAR,再用 Dockerfile 的 `runtime-prebuilt` target 打镜像
-(不要走默认多阶段 build target,那会在 Docker 内从零下载依赖、用不上宿主机缓存):
+(不要走默认多阶段 build target,那会在 Docker 内从零下载依赖、用不上宿主机缓存)。
+**构建上下文是仓库根目录而不是 `server/`**:Dockerfile 的 rmqctl 阶段要 `COPY rmqctl/` 与根目录的
+`LICENSE NOTICE`,镜像才会自带 `/usr/local/bin/rmqctl`(AI 后端以 `rmqctl mcp stdio` 拉起 
MCP server):
 
 ```bash
 $SSH 'cd /opt/rocketmq-studio && \
@@ -118,7 +126,7 @@ $SSH 'cd /opt/rocketmq-studio && \
     -v $PWD/server:/app -v $HOME/.m2:/maven-cache -w /app \
     maven:3.9.16-eclipse-temurin-21 \
     mvn -B -ntp -s /maven-cache/settings.xml 
-Dmaven.repo.local=/maven-cache/repository package -DskipTests && \
-  docker build --target runtime-prebuilt -t rocketmq-server:latest server/'
+  docker build --target runtime-prebuilt -f server/Dockerfile -t 
rocketmq-server:latest .'
 ```
 
 - 若目标机 `~/.m2/settings.xml` 不存在(海外机器通常不需要镜像源),去掉 `-s 
/maven-cache/settings.xml`。

Reply via email to