vishnubob / wait-for-it

Pure bash script to test and wait on the availability of a TCP host and port
MIT License
9.39k stars 2.27k forks source link

Request to have a shell version of the script #121

Open mrhovunping opened 2 years ago

mrhovunping commented 2 years ago

Hi team,

The script is quite useful, we used it a lot on linux container (ubuntu based). We have switched to Alpine version container and script does not work on this version because "bash" is not the default shell. While there is a work around to install bash on alpine, it would be nice to have a sh version of the script.

lwblackledge commented 2 years ago

I found a shell version here: https://gist.github.com/yahyaergun/597d787c6aeffd495e9eaa8b3fdd8e96 A similar issue also linked this go-powered binary version: https://github.com/roerohan/wait-for-it

roerohan commented 2 years ago

A similar issue also linked this go-powered binary version: https://github.com/roerohan/wait-for-it

Yep, I had the same issue. I was using the scratch container, which doesn't have bash in it (which is why I re-wrote it in go, to package it into a binary executable). It's not been updated for a while, but ideally, it should run on alpine.

atkrad commented 2 years ago

Hey @mrhovunping ,

You can install the Wait4X from the official Alpine repositories: apk add wait4x

alexislefebvre commented 6 months ago

Duplicate of #18?