in this example, I copy wait-for-it.sh inside /app/wait-for-it.sh But, I don't want to save wait-for-it.sh in my local directory. I want to download it using curl and then copy into /app/wait-for-it.sh
FROM prismagraphql/prisma:1.34.8
COPY ./wait-for-it.sh /app/wait-for-it.sh
RUN chmod +x /app/wait-for-it.sh
ENTRYPOINT ["/bin/sh","-c","/app/wait-for-it.sh mysql:3306 --timeout=0 -- /app/start.sh"]
What I have tried is this, but how can I get the wait-for-it.sh
after downloading the file using curl command:
FROM prismagraphql/prisma:1.34.8
FROM node:11-slim
RUN apt-get update && apt-get install -yq build-essential dumb-init
RUN curl -LJO https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh
COPY wait-for-it.sh /app/wait-for-it.sh
RUN chmod +x /wait-for-it.sh
ENTRYPOINT ["/bin/sh","-c","/wait-for-it.sh mysql:3306 --timeout=0 -- /app/start.sh"]