paketo-buildpacks / health-checker

A Cloud Native Buildpack that provides a health check binary compatible with Docker health checks
Apache License 2.0
6 stars 0 forks source link

image throw no detect directory error #23

Closed TianMing2018 closed 1 year ago

TianMing2018 commented 1 year ago

is this buildpack image is valid,cause it throw this error fork/exec /cnb/buildpacks/paketo-buildpacks_health-checker/1.1.0/bin/detect: no such file or directory

buildpack https://registry.buildpacks.io/buildpacks/paketo-buildpacks/health-checker

Expected Behavior

build success and get a health check

Current Behavior

build failed

Possible Solution

Steps to Reproduce

  1. clone repo ubuntu@DESKTOP-T0EV4J4:~$ git clone https://github.com/buildpacks/samples
  2. install pack as https://buildpacks.io/docs/tools/pack/#linux-ubuntu
  3. run build command
    ubuntu@DESKTOP-T0EV4J4:~$ sudo pack build sample-java-maven-app \
    --builder cnbs/sample-builder:alpine \
    --buildpack samples/java-maven \
    --buildpack samples/buildpacks/hello-processes/ \
    --buildpack docker://cnbs/sample-package:hello-universe \
    --buildpack paketo-buildpacks/health-checker \
    --path samples/apps/java-maven/
  4. get error
    Status: Downloaded newer image for buildpacksio/lifecycle:0.15.2
    ===> ANALYZING
    [analyzer] Previous image with name "sample-java-maven-app" not found
    ===> DETECTING
    [detector] ======== Error: paketo-buildpacks/health-checker@1.1.0 ========
    [detector] fork/exec /cnb/buildpacks/paketo-buildpacks_health-checker/1.1.0/bin/detect: no such file or directory
    [detector] err:  paketo-buildpacks/health-checker@1.1.0
    [detector] ERROR: No buildpack groups passed detection.
    [detector] ERROR: failed to detect: buildpack(s) failed with err
    ERROR: failed to build: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 21

Motivations

i'm building some related spring-boot apps,such as A,B,C, while B sholud start up after A has startup completely,and C need start up after all, as docker compose docs said, I need a healthcheck test,it seems that this repo was the only way to do this cause buildpack disable curl usage for security reason

TianMing2018 commented 1 year ago

it still faild whn I use --buildpack health.tgz which generate by manually run ./script/build.sh and re-tar tgz file

dmikusa commented 1 year ago

It's hard to say what has happened here as there's a custom builder and some non-Paketo buildpacks.

That file is present in the image though, you can see that with dive.

Screenshot 2022-12-19 at 10 15 56 AM

Can you try running with the Paketo builder and buildpacks and see if it works for you?

TianMing2018 commented 1 year ago

It's hard to say what has happened here as there's a custom builder and some non-Paketo buildpacks.

That file is present in the image though, you can see that with dive.

Screenshot 2022-12-19 at 10 15 56 AM

Can you try running with the Paketo builder and buildpacks and see if it works for you?

guess you screenshot is captured by

 dive  gcr.io/paketo-buildpacks/health-checker

my pulled image do have those files,and this https://github.com/paketo-buildpacks/health-checker/issues/23#issue-1501104918 still failed .

anyway,this issuse is a derivative for try to resolve health-check need for spring-boot app, now it's resolved and the detail command and sample code is push to https://github.com/TianMing2018/paketo-demo#24-for-health-cheker ,so this issue is not so important to me.

dmikusa commented 1 year ago

OK, it sounds like it's OK for me to close this out, so I'm going to. If I'm mistaken, sorry, just let me know and I can reopen.