No matter what I do I cannot get my variables to inject properly using the CLI in Laravel 11 using Sail and Docker. I have appropriately logged in to my cli and ran “doppler setup” and checked “doppler configure” and all looks to be setup correctly but still having issues.
To run the container I use the following command (no errors are given and boots fine)
doppler run -- ./vendor/bin/sail up -d
When I check to see if my hopefully injected value appears in the container with this command:
./vendor/bin/sail exec laravel.test env | grep MY_VARIABLE_NAME
Environment variable value still shows empty with no injection.
I have confirmed that doppler itself is loading the env correctly just not injecting into the container. I checked this by running this command:
doppler run -- env | grep MY_VARIABLE_NAME
Am I going about this wrong, or is my setup not compatible without customizing my docker image? I was under the assumption that you didn’t need to boot up Doppler in runtime if using the CLI tool and any Doppler specific commands can be controlled over a service token during runtime. Any help is greatly appreciated.