Environment files available at build time?

Hey @ericmand, it looks like you want to be injecting secrets into your cron job. We support doing that at build time and run time, but looking at your Dockerfile, it looks like you might only need it at run time if your main.sh can activate the service account. I recommend doing it at run time because it’s best practice to avoid including secrets in Docker images.

If you create a secret file in the dashboard for your service named service_account_key.json, it will be available to your cron job when it runs at /etc/secrets/service_account_key.json.

If you do need that secret file during build time though, you’ll have to make use of Docker’s secret mount capability. We don’t have docs on that yet, but check out my post on it.