How to pass args to dockerfile

Qovery injects your specified environment variables and secrets at the build and run time. However, if you want to use them in your Dockerfile, you need to specify their usage:

...
ARG STRIPE_API_KEY
ENV STRIPE_API_KEY $STRIPE_API_KEY
...

If you have multiple environment variables that you want to use at the build time, then you will need to add them as well.

Here is an article explaining how Docker handles this.

1 Like