qqeasonchen opened a new pull request, #5351:
URL: https://github.com/apache/eventmesh/pull/5351
## What this PR does
Closes #5350 — Docker review fixes for both shipped images.
### Both images
| Change | Before | After |
|---|---|---|
| User | root (default) | `eventmesh` uid 10001 / `connector` uid 10002,
`USER` before `CMD` |
| COPY | `COPY --from=builder /build/dist ./` (root-owned) |
`--chown=<user>:<group>` |
| Locale | `apt-get install locales` + `localedef en_US.UTF-8`, never
selected by any ENV | dropped; `ENV LANG=C.UTF-8 LC_ALL=C.UTF-8` (base image
ships C.UTF-8) |
| Persistent state | none declared | `VOLUME` for the `data/` dir (RocksDB /
connector offsets) |
### Runtime image (`apache/eventmesh`)
- `HEALTHCHECK` — `GET /admin/health` on
`127.0.0.1:${EVENTMESH_ADMIN_PORT:-8081}` via bash `/dev/tcp`, expects `200` on
the response's first line. No curl/wget layer added (Debian bash ships
net-redirections). `--start-period=40s` covers JVM boot.
- EXPOSE comment now documents that the A2A Gateway (`A2AGatewayServer`,
EXPERIMENTAL) is **not** started by `bin/start.sh` today, so nobody hunts for a
port that isn't listening.
### Connector image (`apache/eventmesh-connector`)
- `HEALTHCHECK` — `pgrep -f ConnectorApplication` (process-level). The admin
port defaults to `0` (off), so an HTTP probe would false-negative for the
default config; the comment says to swap in an HTTP check once the admin API
grows a documented health route.
### Kept as-is (recorded in the issue, P2)
- `EVENTMESH_LOG_HOME` / `CONFPATH` ENVs — zero consumers in source, kept as
a mount convention.
- Builder stage still runs as root inside `gradle:8.5.0-jdk21` — build-time
only, no shipped artifact impact.
- `RUN chmod +x bin/*.sh` — possibly redundant with gradle dist file modes,
harmless.
### Verification
- Dockerfile syntax: both files are plain multi-stage builds using only
`RUN`/`COPY`/`ENV`/`EXPOSE`/`HEALTHCHECK`/`VOLUME`/`USER`/`WORKDIR`/`CMD`;
`HEALTHCHECK --interval=30s --timeout=5s --start-period=40s --retries=3 CMD ...
|| exit 1` is the exec-agnostic shell form Docker documents.
- `bash -c 'exec 3<>/dev/tcp/...'`: net-redirections are enabled in
Debian/Ubuntu bash (the `eclipse-temurin:21-jre` base), used instead of adding
curl (~15MB) or wget.
- Runtime healthcheck target: `UniAdminServer` registers
`server.createContext("/admin/health", this::health)` — confirmed by reading
source.
- Local image build not possible in this sandbox; the CI `Docker` workflow
(runs on release) plus a manual `docker build -f docker/Dockerfile .` are the
authorities. Note the repo-wide Actions outage currently blocks all
ubuntu-latest workflows (unrelated to this PR).
Co-authored-by: qqeasonchen <[email protected]>
--
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]