chainguard-images / images

Public Chainguard Images
https://chainguard.dev/chainguard-images
Apache License 2.0
544 stars 144 forks source link

Bug wait-for-it image. #136

Closed marcofranssen closed 1 year ago

marcofranssen commented 1 year ago

Seems the binary isn't found.

$ docker run -it --rm cgr.dev/chainguard/wait-for-it:latest-20221214 -t 30 google.com
Unable to find image 'cgr.dev/chainguard/wait-for-it:latest-20221214' locally
latest-20221214: Pulling from chainguard/wait-for-it
a7362c0b0fa5: Pull complete 
Digest: sha256:28b3974f83f5cdd3148e3dbc5fe44c914f86970c746ab6dc35453d43f58f0555
Status: Downloaded newer image for cgr.dev/chainguard/wait-for-it:latest-20221214
exec /usr/bin/wait-for-it: no such file or directory
developer-guy commented 1 year ago

Thx for raising an issue @marcofranssen! Thx to the @rawlingsj, we figured out the problem and it will be landed soon! Here is the PR for the fix.

developer-guy commented 1 year ago

The PR for the fix is now merged, then I requested from @kaniini to re-trigger the pipeline for the wait-for-it image, the pipeline looks like completed successfully, but I tried to run the newer wait-for-it image, it seems that problem still exists @rawlingsj 😩

$ docker container run cgr.dev/chainguard/wait-for-it:latest-20221214
exec /usr/bin/wait-for-it: no such file or directory
rawlingsj commented 1 year ago

Did you try a docker pull? I just got the latest digest from the registry https://registry-ui.chainguard.app/?image=cgr.dev/chainguard/wait-for-it@sha256:a268fe22ed72687d2d8a9493c7af874f9b1013a18a43d5c121c957f1b94fe2a5

And it seems to work

docker run cgr.dev/chainguard/wait-for-it@sha256:a268fe22ed72687d2d8a9493c7af874f9b1013a18a43d5c121c957f1b94fe2a5
Error: you need to provide a host and port to test.
Usage:
    wait-for-it host:port [-s] [-t timeout] [-- command args]
    -h HOST | --host=HOST       Host or IP under test
    -p PORT | --port=PORT       TCP port under test
                                Alternatively, you specify the host and port as host:port
    -s | --strict               Only execute subcommand if the test succeeds
    -q | --quiet                Don't output any status messages
    -t TIMEOUT | --timeout=TIMEOUT
                                Timeout in seconds, zero for no timeout
    -- COMMAND ARGS             Execute command with args after the test finishes
marcofranssen commented 1 year ago

I did the following and it works. 🚀

$ docker run --rm cgr.dev/chainguard/wait-for-it:latest-20221215 -t 30 -p 443 -h google.com
wait-for-it: waiting 30 seconds for google.com:443
wait-for-it: google.com:443 is available after 0 seconds

Please not yesterdays tag latest-20221214 does not work, initially I also made the mistake by testing with same tag.

rawlingsj commented 1 year ago

OK great to hear! I'm going to close this issue. Reopen or we can work on a new issue if you run into anymore problems.