orangeCatDeveloper opened a new pull request, #4189:
URL: https://github.com/apache/hertzbeat/pull/4189
## Summary
- The collector Docker image's container path was version-suffixed
(`/opt/apache-hertzbeat-collector-${VERSION}-bin`), so `logs`/`ext-lib` volume
mounts had to be updated on every upgrade
- It also depended on a `--build-arg VERSION` that the nightly CI workflow
never actually passed, so `ADD`/`WORKDIR` path resolution was broken
- Extract the tarball via a version-agnostic glob
(`apache-hertzbeat-collector-[0-9]*-bin.tar.gz`, deliberately excluding the
co-located native collector package) and rename it to a fixed
`/opt/hertzbeat-collector`, matching the version-independent layout the server
image already uses
- Removed the now-unconsumed `--build-arg VERSION` from `build.sh`
- Updated English/Chinese docs to document the stable path and the `ext-lib`
mount
## Test plan
- [x] `docker build` with only the real collector tarball in the build
context — succeeds, `/opt/hertzbeat-collector` contains
`bin/config/lib/ext-lib/logs`(created at runtime)
- [x] `docker build` with a decoy
`apache-hertzbeat-collector-native-*-bin.tar.gz` alongside the real tarball in
`dist/` (the actual release layout) — succeeds; confirmed the old unrestricted
glob (`apache-hertzbeat-collector-*-bin.tar.gz`) fails in this exact scenario
with `mv: target '/opt/hertzbeat-collector': No such file or directory`
- [x] `docker run` against the built image — `WORKDIR` resolves to
`/opt/hertzbeat-collector`, entrypoint starts correctly
Fixes #2175
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01C5cCEyVcXDfVDSjRjwsSoA
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]