A Docker image with the wait-for-it.sh script, a pure bash script that will wait on the availability of a host and a port.
To use the wait-for-it.sh
script directly with Docker, run:
bashCopy code
docker run --rm cdddghub/wait-for-it <your-host>:<your-port> -- <your-command>
Replace <your-host>
, <your-port>
, and <your-command>
with your desired values.
To use the wait-for-it.sh
script within a docker-compose
setup, add it as a service in your docker-compose.yml
:
yamlCopy code
version: '3'
services:
wait-for-it:
image: cdddghub/wait-for-it
command: <your-host>:<your-port> -- <your-command>
Again, replace <your-host>
, <your-port>
, and <your-command>
with your desired values.
For more detailed information about the wait-for-it.sh
script, please refer to the original repository.