-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Busybox's timeout requires different arguments #5
Comments
While I like the idea of simultaneously supporting busybox, the problem is that busybox doesn't seem to support the /dev/tcp extension that is built into bash, which is an intrinsic requirement of |
Perhaps
|
Also of note in this case, I'm wondering if it might be preferable that the script just waits the maximum time? |
If you are interested in adding support for busybox, please feel free to fork this repository and adjust it to your needs. If your modifications provide simultaneous compatibility with bash, I would welcome a pull request. |
@vishnubob have you looked into #6 yet? |
+1 bash-4.3# wait-for-it google.com:80
timeout: can't execute '15': No such file or directory
wait-for-it: timeout occurred after waiting 15 seconds for google.com:80 |
not using alpine for now since it having issue, see: vishnubob#5
#31 fixes the call to |
Busybox support added with this pull request. Note that this does require bash to be installed on busybox. |
@iturgeon Thanks for posting this!! Helped me figure out why timeout was not working when switching from a fat ubuntu docker image to alpine. |
LOL, Busybox has fixed that. Newer busybox will not wok with workaround made for old one (!) |
I was using wait-for-it on a debian docker container, and all things were great (thanks for the script!).
However, we switched to an Alpine Linux based docker image (which uses busybox) and the script stopped waiting correctly.
As it turns out
timeout
requires an argument flag for the time. Here's the manual from https://busybox.net/downloads/BusyBox.htmlThis differs from typical linux usage:
Changing lines 52 and 54 where
timeout
is used by prepending-t
before the$TIMEOUT
causes it to work.Here's the working result:
I did a quick search for a simple method to determine if busybox is being used, not sure what the best solution would be. Worst case - this post may help others in a similar situation.
The text was updated successfully, but these errors were encountered: