Summary
The official Docker image for openab-gemini (ghcr.io/openabdev/openab-gemini:latest) is consistently reported as unhealthy by Docker. This is because the HEALTHCHECK command defined in Dockerfile.gemini uses pgrep, which is not available in the base node:22-bookworm-slim image without the procps package.
Reproduction Steps
- Pull the official image:
docker pull ghcr.io/openabdev/openab-gemini:latest
- Run the container with any configuration (or even without one, as the healthcheck runs independently of the application logic):
docker run -d --name openab-test ghcr.io/openabdev/openab-gemini:latest
- Wait for the healthcheck interval (30s) and observe the container status:
Actual Result: The status shows
(unhealthy).
Root Cause
The Dockerfile.gemini contains the following healthcheck:
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD pgrep -x openab || exit 1
However, the node:22-bookworm-slim base image does not include the procps package (where pgrep resides). Running docker exec <id> pgrep results in an executable file not found error, causing the healthcheck to fail.
Proposed Fix
Add procps to the apt-get install command in the runtime stage of Dockerfile.gemini:
--- a/Dockerfile.gemini
+++ b/Dockerfile.gemini
@@ -10,7 +10,7 @@ RUN touch src/main.rs && cargo build --release
# --- Runtime stage ---
FROM node:22-bookworm-slim
-RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
+RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl procps && rm -rf /var/lib/apt/lists/*
Verification
After rebuilding the image with the above change, the container status correctly shows as (healthy) when the openab process is running.
CONTAINER ID IMAGE STATUS NAMES
e74b564cf32f custom-image:latest Up (healthy) openab-fixed
Summary
The official Docker image for
openab-gemini(ghcr.io/openabdev/openab-gemini:latest) is consistently reported asunhealthyby Docker. This is because theHEALTHCHECKcommand defined inDockerfile.geminiusespgrep, which is not available in the basenode:22-bookworm-slimimage without theprocpspackage.Reproduction Steps
(unhealthy).Root Cause
The
Dockerfile.geminicontains the following healthcheck:However, the
node:22-bookworm-slimbase image does not include theprocpspackage (wherepgrepresides). Runningdocker exec <id> pgrepresults in anexecutable file not founderror, causing the healthcheck to fail.Proposed Fix
Add
procpsto theapt-get installcommand in the runtime stage ofDockerfile.gemini:Verification
After rebuilding the image with the above change, the container status correctly shows as
(healthy)when theopenabprocess is running.