Open alexaung opened 2 years ago
You need bash
to run wait-for-it
. E.g.:
FROM node:alpine
# Install bash to use 'wait-for-it'
RUN apk update && apk add bash && apk add --no-cache coreutils
# Add 'wait-for-it'
COPY wait-for-it.sh /usr/local/bin/wait-for-it
RUN chmod +x /usr/local/bin/wait-for-it
Then you'll be able to use wait-for-it
inside docker-entrypoint or Dockerfile without issues.
@gioamato's answer works perfectly. However, I had faced a similar issue when I was using scratch
as my base container (so I didn't have bash). I've made a binary executable for wait-for-it
, you can check it out here if you're interested
https://github.com/roerohan/wait-for-it
This script is not working with node:17-alpine. Is there other way around?