unbridled-41 opened a new pull request, #5433:
URL: https://github.com/apache/rocketmq-dashboard/pull/5433

   ## Problem / Evidence
   
   `server/Dockerfile:17-20` declares **"Build context: REPOSITORY ROOT (not 
server/)"**, and its first stage reads four paths from that root:
   
   ```dockerfile
   COPY rmqctl/go.mod rmqctl/go.sum ./
   COPY rmqctl/ ./
   COPY LICENSE NOTICE /src/
   ```
   
   `runtime-prebuilt` still builds that stage — `runtime-base` does `COPY 
--from=rmqctl-build /out/rmqctl /usr/local/bin/rmqctl` 
(`server/Dockerfile:81`), so the Go stage is a dependency of the image 
`deploy.sh` produces. Both packaged source sets were missing inputs:
   
   **1. `deploy/deploy.sh` (the maintained path) omits the root 
`LICENSE`/`NOTICE`.** `package_source` tars `server web deploy rmqctl` 
(`deploy/deploy.sh:59-62`, with `--exclude` filters but neither file), and 
`build_server` runs `docker build --target runtime-prebuilt -f 
server/Dockerfile ... .` from the extracted root. On a target host that does 
not already hold those files — the fresh host the skill's step 1 sets up — the 
build stops at:
   
   ```
   COPY failed: file not found in build context or excluded by .dockerignore: 
stat LICENSE: file does not exist
   ```
   
   **2. The manual Mode A path (`.claude/skills/deploy-rocketmq/SKILL.md`) also 
shipped no `rmqctl` and built with `server/` as the context**, which cannot 
satisfy `COPY rmqctl/go.mod ...` at all:
   
   ```
   Step 4/8 : COPY rmqctl/go.mod rmqctl/go.sum ./
   COPY failed: file not found in build context or excluded by .dockerignore:
               stat rmqctl/go.mod: file does not exist
   ```
   
   ## Root cause / Fix
   
   The packaging was not updated when the image gained the `rmqctl` stage and 
its root-context files. Fix: add `LICENSE NOTICE` to both packages (with the 
accompanying comments) and build the manual path with `-f server/Dockerfile ... 
.`, exactly as `deploy.sh` does.
   
   ## Priority & scoring
   
   PRIORITY 74 = 影响 30 (the one-command deployment cannot build the server 
image on a fresh host; the manual path cannot either) + 波及 12 (deploy.sh + the 
deploy skill, both documented entry points) + 可复现 20 (demonstrated against the 
real packaging below) + 维护价值 12.
   
   FIX_CONFIDENCE 90: two `tar` file lists and one `docker build` context flag, 
verified end to end.
   
   ## Tests
   
   Verified against the real packaging rather than by inspection — the 
Dockerfile's context reads were exercised over both file lists:
   
   - Previous list (`server web deploy rmqctl`), extracted: `Step 5/5 : COPY 
LICENSE NOTICE /src/` → `COPY failed: ... stat LICENSE: file does not exist`.
   - Skill's previous context (`server/`): `COPY rmqctl/go.mod rmqctl/go.sum 
./` → `COPY failed: ... stat rmqctl/go.mod: file does not exist`.
   - New list (`server web deploy rmqctl LICENSE NOTICE`), extracted, root 
context: **`Successfully built`** — every `COPY` of the stage satisfied.
   - `bash -n deploy/deploy.sh` passes.
   
   ## Risk
   
   Low. Only the packaged file list and the manual build context change; the 
excludes for `deploy/.env`, `rmqctl/bin`, `web/node_modules`, `web/dist` and 
`server/target` are preserved, and the remote build command now matches the one 
that has always been intended for a root context.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to