Alpine Linux (Docker): Cannot reference env vars in shell

Hey Johannes,

Your commands are really close, and your second example would have worked if you had escaped the $ character. The is because the shell is interpreting your variable before doppler sees it.

doppler run --command “echo \$AWS_ACCESS_KEY_ID”

Also, here are three alternatives:

# Using the `--command` flag (recommended)
doppler run --command 'echo $DOPPLER_PROJECT' # single-quote form, no need to escape variable

# Using `printenv` to access a specific environment variable
doppler run -- printenv DOPPLER_PROJECT

# Execute the command using a specific shell (sh used in this case)
doppler run -- sh -c 'echo $DOPPLER_PROJECT'