Currently my run command looks like this...
docker run -e DB_URL=$DB_URL -e DB_PORT=$DB_PORT ... <image name>
This works but not very scalable. Is there a way to just pass all configured env vars to the container without declaring each one?
I am using OSX and these are set in a .bash_profile.
env > envFile && docker run --env-file=envFile alpine env
However I would not recommend doing this as this will pass even un-necessary info to docker container. And you should rather use a compose file or maybe even a simple script to only pass in variables that are actually needed. This might even mess with the shell inside of a container for things like prompts and locales etc.