Skip to content
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

Wait for it is not working with node:17-alpine #118

Open
alexaung opened this issue Jan 17, 2022 · 3 comments
Open

Wait for it is not working with node:17-alpine #118

alexaung opened this issue Jan 17, 2022 · 3 comments

Comments

@alexaung
Copy link

This script is not working with node:17-alpine. Is there other way around?

@gioamato
Copy link

gioamato commented Jan 17, 2022

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.

@roerohan
Copy link

@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

@atkrad
Copy link

atkrad commented Oct 14, 2022

Hey @alexaung ,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants