Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: docker compose healthcheck broken #3468

Closed
wants to merge 2 commits into from
Closed

fix: docker compose healthcheck broken #3468

wants to merge 2 commits into from

Conversation

qclaogui
Copy link
Contributor

@qclaogui qclaogui commented Aug 7, 2024

Starting from 1.7.0, Pyroscope replaces alpine with distroless which will cause docker compose healthcheck to fail
#3437

e.g. :

services:
  pyroscope:
    image: docker.io/grafana/pyroscope:1.7.1

     ...

    healthcheck:
      ## execute the `test` without a shell, use the form: `["CMD", "command", "arg1", "arg2"]`
      test: [ "CMD", "/usr/bin/wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4040/ready" ]
    ports:
      - "4040:4040"

Solution:

adding busybox wget to the image and use it.

Releates: qclaogui/codelab-monitoring#201

Signed-off-by: Weifeng Wang <qclaogui@gmail.com>
@qclaogui qclaogui requested a review from a team as a code owner August 7, 2024 06:26
@korniltsev
Copy link
Collaborator

One of the points to use distrolless is to reduce "atack surface" / "CVE noise". Adding wget back would be a step back.

Can you try using profilecli ?
maybe profilecli query series could serve your healthcheck ?

Another option could be to bind mount volume with readonly wget into the pyroscope container

 volumes:
      - ./wget:/usr/bin/wget

@korniltsev
Copy link
Collaborator

Braindumping other options: Maybe we could add profilecli ready or maybe we can add a flag to canary-exporter to run it once and also check /ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants