How do I use Doppler environment variables during build time?

Last updated: February 9, 2026

Context

When using Doppler for environment variables management, you may notice that the environment variables are not available during the build process, causing build failures. This is implemented as a security measure to protect sensitive information.

Answer

For security reasons, Doppler environment variables are not automatically sent to builds. To use Doppler environment variables during build time, you'll need to:

  1. Switch from buildpacks to using a Dockerfile for your deployment (if needed)

  2. Add your Doppler API token as a GitHub secret in your repository

  3. Configure your build process to use the Doppler token to fetch environment variables during build time (refer to this documentation on adding external env vars to the Docker build done by the Porter CLI)

This configuration is only necessary if you need access to environment variables during the build process. If you only need the environment variables for runtime, the standard Doppler integration will work without additional configuration.