-
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
not working on alpine 3.10 with bash installed #71
Comments
I can confirm the issue, we are getting the same problem. |
This breaking change in BusyBox ("timeout: fix arguments to match coreutils") seems to be the reason, I just ran into the same issue after our build image was updated to alpine:3.10 |
Thanks for the workaround @JoshKCarroll |
how to resolve ?
or Specify ENV and run script
and use it in wait-for-it.sh script without if else match in busybox. |
e.g A docker image xueshanf/awscli
trouble
|
directly change wait-for-it.sh # check to see if timeout is from busybox?
WAITFORIT_TIMEOUT_PATH=$(type -p timeout)
WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH)
if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then
WAITFORIT_ISBUSY=1
WAITFORIT_BUSYTIMEFLAG="-t"
else
WAITFORIT_ISBUSY=0
WAITFORIT_BUSYTIMEFLAG=""
fi
+ if [[ ! -z "${WAITFORIT_NO_BUSYTIMEFLAG}" ]]; then
+ WAITFORIT_BUSYTIMEFLAG=""
+ fi
|
Hopefully #81 solves this for you guys. The script still requires the use of bash on Alpine, but it should detect newer versions of BusyBox and deal with the updated flags appropriately. |
Ran into this issue and confirming @JoshKCarroll's workaround (installing coreutils) works. The maintainer @vishnubob seems to have abandoned this project...no responses to issues, last commit over a year ago, and there are 25 pull requests...2 of which try to fix this problem. we're on our own! |
I think you are right @riptusk331 . Is there a popular fork of this repo? |
Ah, I opened another PR that fixes the issue (but doesn't preserve backwards compat, so @iturgeon's is better) because I didn't read existing issues closely enough first. |
see issue vishnubob/wait-for-it#71 also reduced the wait time to 30seconds
@douglas-gibbons , @vishnubob - Any chance one of the PRs that patch this issue can be merged? Has this repo been abandoned? If so, would someone else here be able to take over maintenance? Thanks! |
Anyone have a dockerfile for alpine. Would love to try this using a docker run. Cheers! |
@pascalandy used in the project https://github.com/gioamato/stateless-wordpress The implementation is inside NGINX Dockerfile: https://github.com/gioamato/stateless-wordpress/blob/master/nginx/Dockerfile |
Thanks @gioamato. If I understood: a Dockerfile for alpine
|
@pascalandy exactly. I suggest you to install dependencies first and then copy wait-for-it as the last thing. Doing so you will not invalidate docker build layers if you update wait-for-it script (Ref.: https://docs.docker.com/develop/develop-images/dockerfile_best-practices) |
Got it about the layer :-p |
we use wait-for-it.sh heavily in CI for docker integration testing in golang. Recently a job broke due to wait-for-it.sh error. I believe the issue may have to do with something changing in timeout from alpine3.9 (works) to alpine 3.10 (not working). In both cases we were installing bash with apk.
Repro (note in
vi
I am copying wait-for-it from current master)Workaround: I was able to work around this issue by installing coreutils as well which updates
timeout
(continuing from example above)The text was updated successfully, but these errors were encountered: